incorrect path loading some css files
-
The plugin is attempting to load some files with an incorrect URL, e.g.
https://www.gunumalodge.com.au/home/lamp/wordpress/plugins/nextgen-gallery/static/IGW/Block/editor.css?ver=4.0.3the correct URL would be
https://www.gunumalodge.com.au/plugins/nextgen-gallery/static/IGW/Block/editor.css?ver=4.0.3/home/lamp/wordpressis the linux path.It could be that
/src/Display/StaticAssets.phpis getting an incorrect result in line 24:$retval = \str_replace( \wp_normalize_path( WP_PLUGIN_DIR ), WP_PLUGIN_URL, $retval );Possibly this problem is due to our non-standard approach to hosting WP, this is from our version of wp-config.php:
$server_name = $_SERVER['SERVER_NAME'];
include "/home/lamp/wordpress/configs/" . $server_name; // db configs
define('WP_CONTENT_DIR', "/home/lamp/wordpress/wp-content/" . $server_name );
if( ! defined( 'WP_CONTENT_URL') ) define('WP_CONTENT_URL', "https://" . $server_name . "/wp-content/" . $server_name );Put a diagnostic into StaticAssets.php below line 24 and see incorrect URLs:
StaticAssets 25 /home/lamp/wordpress/plugins/nextgen-gallery/static/IGW/Block/build/post-thumbnail.min.js
as well as correct URLs:StaticAssets 25 https://www.gunumalodge.com.au/wp-content/www.gunumalodge.com.au/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_addgallery_page/static/media-library-import.js
Note that the domain name that appears inside the above “correct” url is the actual (correct) URL path, but our VirtualHost adds that component in when a request such as this is made:StaticAssets 25 https://www.gunumalodge.com.au/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_addgallery_page/static/media-library-import.js
So that both forms of URL are served correctly.Also note that the plugin directory as defined above includes slinks to plugin code – the code is used by all our WP sites on this server, in a similar way to WP network sites – we only differ in that root owns everything and plugin updates are done outside of WP by a python script.
lrwxrwxrwx 1 root root 33 Jan 13 2020 nextgen-gallery -> ../../../plugins/nextgen-gallery/The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.