So I've been stuck on this problem for quite a while now and it feels like I've tried everything. I would love for some support here.
The first site among the multisites seem to have some kind of structural problem. The other sites works just fine.
When previewing drafts on posts and pages the user (including superadmin) gets a message: Sorry, you are not allowed to preview drafts
. I've tracked it down to _show_post_preview()
in wp-includes/revision.php
and it seems like the nonce check fails.
A similar problem occurs when customizing the site. When trying to save changes you get: You need a higher level of permission. Sorry, you are not allowed to customize this site.
This error is thrown in wp-admin/js/customize-controls.js
in function cheatin()
which seem to be used when the nonce is off.
preview_post_link
filter..htaccess
and wp-config.php
(in Bedrock: config/application.php
)My .htaccess
:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wp/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
RewriteRule . index.php [L]