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

Invalid JSON Response and RESI API Issue #60974

Closed
oryfoxer opened this issue Apr 22, 2024 · 6 comments · Fixed by #60925
Closed

Invalid JSON Response and RESI API Issue #60974

oryfoxer opened this issue Apr 22, 2024 · 6 comments · Fixed by #60925
Labels
REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended

Comments

@oryfoxer
Copy link

Description

We have a wordpress instance running on AWS using bitnami. We are currently running PHP 8.1.16, Wordpress 6.5.2.

The site was running fine, perhaps it updated, idk, but we started getting invalid JSON response when updating. Also, other features that seem to use the REST API do not appear to be functioning.

I attempted recreating the .htaccess, resetting permissions per bitnami's support page (https://docs.bitnami.com/aws/how-to/troubleshoot-permission-issues/), changing permalink structure, while also increasing php values such as max_upload/max_input_vars/max_timeout.

We currently had child theme for divi, but I swiched to twenty-twenty and disabled all plugins to no avail.

image

image

Here is the debug, "PHP Warning: Attempt to read property... 'null' "
https://pastebin.com/pxTLXDru

Step-by-step reproduction instructions

Not sure, kinda just started, perhaps after an auto-update of wordpress.

Screenshots, screen recording, code snippet

No response

Environment info

PHP 8.1.16, Wordpress 6.5.2. AWS Bitnami

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

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@oryfoxer oryfoxer added the [Type] Bug An existing feature does not function as intended label Apr 22, 2024
@t-hamano
Copy link
Contributor

Thanks for the report.

Looking at the error log, it appears to be similar to the issue reported in the core ticket below.

https://core.trac.wordpress.org/ticket/60909

@Mamaduka Mamaduka added the REST API Interaction Related to REST API label Apr 23, 2024
@creativecoder
Copy link
Contributor

@david-binda
Copy link
Contributor

@creativecoder it seems like the Gutenberg_REST_Templates_Controller_6_6 class is now overriding the get_template_fallback method (since 0e025fd ), but the method does not contain the patch which was submitted to the WordPress. Shall we port it to Gutenberg as well?

@creativecoder
Copy link
Contributor

Thanks for the reminder @david-binda ! I started that here, but need to update it to match the version that merged to core. Will do that today.

@david-binda
Copy link
Contributor

Thanks! I was not entirely sure if the PR is meant to reflect the core or is a separate fix :)

@creativecoder
Copy link
Contributor

#60925 has how been updated to use the same approach from WordPress/wordpress-develop#6420. Please review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended
Projects
5 participants