Problem with multisite subsites admin panel css and js
-
Hello fellow humans.
I have a WP multisite setup which has the some plugins installed. Im having some issues inside the admin panels of the subsites.
For the Network and the main sub-site (i.e. /, the root URL), it works as expected. But on any non-root URL sub-site (i.e. /subsite1, /subsite2), the plugins are currently breaking because it’s trying to load the CSS & JS assets under that sub-site path. It causes the plugins to break entirely for any of the non-root subsites (i.e. infinite loading in the post/page editor, settings will not load).
Currently assets are loading like this:
But Should be loading like this:
https://example.com/site/wp-content/plugins/advanced-custom-fields/assets/build/css/acf-global.css
I’ve done some research but it seems this problem varies for everyone and the solutions i’ve found have not worked.
My wp-config has thisdefine( 'WP_ALLOW_MULTISITE', true ); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false ); define( 'DOMAIN_CURRENT_SITE', 'mydomain' ); define( 'PATH_CURRENT_SITE', '/site/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );And my .htacces have this
RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase /site/ 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).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]Im at my wits end, Im posting in multiple forums to see if I can get some ideas to fix this
The topic ‘Problem with multisite subsites admin panel css and js’ is closed to new replies.