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

Multisite: Not able to publish post. #38825

Closed
paaljoachim opened this issue Feb 15, 2022 · 6 comments
Closed

Multisite: Not able to publish post. #38825

paaljoachim opened this issue Feb 15, 2022 · 6 comments
Labels
[Feature] Multisite Anything related to the specific experience of using a multisite [Type] Bug An existing feature does not function as intended

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 15, 2022

Description

We have a multisite with various plugins.
I suddenly I noticed that after clicking publishing that the spinner kept on going.
I checked the Dev console and noticed a lot of 403 errors.
I followed this tutorial to tackle the 403 errors: https://www.hostinger.com/tutorials/what-is-403-forbidden-error-and-how-to-fix-it
Remove/rename the htaccess file. Then resave permalinks.
That got rid of the 403 errors (for now).

Next step.
Visit a subsite, and click to publish a post. This time instead of the never ending publish loop I now received a:
"Publishing failed. The response is not a valid JSON response."
I was not able to publish a post or page.

Dev console contained these errors:

Uncaught (in promise) 
Object { code: "invalid_json", message: "The response is not a valid JSON response." }
code: "invalid_json"
message: "The response is not a valid JSON response."
​
<prototype>: Object { … }
__defineGetter__: function __defineGetter__()
__defineSetter__: function __defineSetter__()
__lookupGetter__: function __lookupGetter__()
__lookupSetter__: function __lookupSetter__()
__proto__: 
constructor: function Object()
hasOwnProperty: function hasOwnProperty()
isPrototypeOf: function isPrototypeOf()
propertyIsEnumerable: function propertyIsEnumerable()
toLocaleString: function toLocaleString()
toString: function toString()
valueOf: function valueOf()
<get __proto__()>: function __proto__()
<set __proto__()>: function __proto__()

Screenshot 2022-02-15 at 15 16 05

And

Uncaught (in promise) TypeError: activeThemes is null        [core-data.js:4367:3]
    resolvers_getCurrentTheme https://ventservice.no/wp-includes/js/dist/core-data.js?ver=b4684a7c90f2d858ab7fa74414ad5a54:4367
(https://ventservice.no/wp-includes/js/dist/core-data.js?ver=b4684a7c90f2d858ab7fa74414ad5a54)

Screenshot 2022-02-15 at 15 17 40

I am able to save a draft but not publish the post.

Step-by-step reproduction instructions

I am not able to provide a step by step reproduction for this issue.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 5.9
Testing with default theme Twenty Twenty.
All plugins are deactivated.

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


Installing and activating the Classic Editor I am able to publish posts/pages.

@paaljoachim paaljoachim added [Feature] Multisite Anything related to the specific experience of using a multisite [Type] Bug An existing feature does not function as intended labels Feb 15, 2022
@Mamaduka
Copy link
Member

It is maybe related: https://core.trac.wordpress.org/ticket/55015. At least the activeTheme is null error.

@paaljoachim
Copy link
Contributor Author

Thanks George! I am checking. As this error happened recently it might be associated with WP 5.9. I will downgrade the network and see how it goes. It made no difference as far as I could tell.

@paaljoachim
Copy link
Contributor Author

I added a video: https://youtu.be/y9zCWVpLBtI
I feel like I am down in an Alice of Wonderland rabbit hole.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Feb 17, 2022

We figured out the problem.

  • Some sites had difficultly being SSL sertified. (Working with the host on this part.)
  • As I renamed the htaccess file and a new was auto generated. The new htaccess file did not have the needed multisite code. This caused publishing errors with Gutenberg. Adding the below code the publishing error in Gutenberg went away.
# BEGIN WordPress Multisite
# Using subdomain network type: https://wordpress.org/support/article/htaccess/#multisite
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress Multisite

The Classic Editor plugin was able to publish even though the above code was missing from the htaccess file, and was able to work even with problems with SSL. In general the Classic Editor seems more sturdy compared to Gutenberg. Hopefully this issue might compel ways to make Gutenberg even sturdier.

@carolinan
Copy link
Contributor

Hi @paaljoachim since the problem was site specific, can this issue be closed?

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Jul 9, 2024

Thanks for noticing the issue. Closing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Multisite Anything related to the specific experience of using a multisite [Type] Bug An existing feature does not function as intended
3 participants