Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema won't load when special characters are used in Flex Field Layout names #164

Open
2 of 3 tasks
jasonbahl opened this issue Feb 1, 2024 · 0 comments
Open
2 of 3 tasks
Assignees
Labels
status: actionable Ready for work to begin type: bug Issue that causes incorrect or unexpected behavior

Comments

@jasonbahl
Copy link
Contributor

Description

When a Flex Field Layout contains non-ascii characters in the layout name, the Schema fails to load.

Steps to reproduce

  1. Add an ACF Field of the "flexible_content" field type to an ACF Field Group
  2. Add a layout to the field with the label: Výchozí konfigurovatelné Hero
  3. try and load the GraphQL Schema
  4. see errors

CleanShot 2024-02-01 at 14 11 40

I would expect for the Schema to still generate, but leaving out any types/fields that are invalid, and providing a debug message explaining the problem.

PHP or JSON export of the ACF Field Group(s)

acf-export-2024-02-01 (2).json.zip

Additional context

I believe we need some validation here: https://github.com/wp-graphql/wp-graphql/blob/develop/src/Type/WPObjectType.php#L109

To ensure that field names are valid before attempting to apply them.

WPGraphQL Version

1.20.0

WPGraphQL For ACF Version

2.1.0

ACF (Advanced Custom Fields) Version. Free or Pro?

latest pro

WordPress Version

6.4.2

PHP Version

8.2

Additional enviornment details

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.

  • Yes
  • My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
@jasonbahl jasonbahl self-assigned this Feb 1, 2024
@jasonbahl jasonbahl added type: bug Issue that causes incorrect or unexpected behavior status: actionable Ready for work to begin labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: actionable Ready for work to begin type: bug Issue that causes incorrect or unexpected behavior
Projects
None yet
Development

No branches or pull requests

1 participant