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

WPGraphQL Error When saving HTML in Textarea or WYSIWYG ACF Fields #202

Open
2 of 3 tasks
archoda opened this issue Apr 28, 2024 · 2 comments
Open
2 of 3 tasks

WPGraphQL Error When saving HTML in Textarea or WYSIWYG ACF Fields #202

archoda opened this issue Apr 28, 2024 · 2 comments
Labels
needs: reproduction This issue needs to be reproduced independently

Comments

@archoda
Copy link

archoda commented Apr 28, 2024

Description

When trying to save HTML in a field, i'm getting a JSON error. I've got year old sites where i've used similar ACF and was not getting this issue then - that I know of, although I am adding a bit more HTML in this instance. But, don't believe that should be an issue.

Screenshot 2024-04-28 at 6 19 39 PM

Steps to reproduce

  1. Create an ACF. FieldGroup called 'PageControl'
  2. Add a simple Textarea ( or WYSIWYG ) field called HTML
  3. Set the Field group to show in both Page & Post type(s)
  4. Go to the 'Home' page, add any <style>,<script>, or full HTML content you'd typically find in an tag and you'll get this error.

Additional context

Yes, I've disabled all plugins except the WPGraphQL ( 1.24.0 ), WPGraphQL Gutenberg ( 0.4.1 ), WPGraphQL for ACF ( 2.2.0 ), and ACFPro, since they are required to run the content.

WPGraphQL Version

1.24.1

WordPress Version

6.4.3

PHP Version

8.1.23

Additional environment details

Running Locally in Local App w/ NGINX and MySQL 8/0.16

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

  • Yes

Please confirm that you have disabled ALL plugins except for WPGraphQL.

  • Yes
  • My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
@jasonbahl
Copy link
Contributor

@archoda I'm going to transfer this issue from the core WPGraphQL repo over to the WPGraphQL for ACF issue

@jasonbahl jasonbahl transferred this issue from wp-graphql/wp-graphql Apr 29, 2024
@jasonbahl
Copy link
Contributor

@archoda this looks like a case of invalid HTML in the "meta" field. The <meta> tag is not closed which might be causing some problems?

That said, I think we can probably investigate how to resolve this better in cases like this where invalid HTML is saved and then queried for 🤔

@jasonbahl jasonbahl added the needs: reproduction This issue needs to be reproduced independently label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: reproduction This issue needs to be reproduced independently
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants