Plugin not working – Full folder path appended to website URL
-
Hi,
Here is the problem (not limited to this file):
As you can see it appends the absolute path of the plugin folder to the base url. After digging around I fixed the problem by editing the file/function:
package.module.mvc.php
public function get_static_url($path, $module = FALSE)where I replaced:
$retval = self::$_lookups[$key] = $this->object->join_paths($this->object->get_base_url($found_root), str_replace('\\', '/', $path));
by
$path = str_replace('path/to/web', '', $path); $retval = self::$_lookups[$key] = $this->object->join_paths($this->object->get_base_url($found_root), str_replace('\\', '/', $path));
I am not saying it is the right fix, but I’d like to understand why it uses the absolute path and if my config is the problem? Knowing that everything else works just fine.
wp-config.php:
define('WP_HOME', 'https://mywebsite.com'); define('WP_SITEURL', 'https://mywebsite.com'); define('UPLOADS', 'uploads'); define('WP_PLUGIN_DIR', __DIR__ . '/plugins'); define('WPMU_PLUGIN_DIR', __DIR__ . '/mu-plugins'); define('WP_CONTENT_DIR', __DIR__ . '/wp-content'); define('WP_CONTENT_URL', WP_HOME . '/wp-content'); define('WP_PLUGIN_URL', WP_HOME . '/plugins'); define('WPMU_PLUGIN_URL', WP_HOME . '/mu-plugins');
I can’t access any part of this plugins, settings, WYSIWYG or anything else as the javascript isn’t properly loaded.
Thanks for the support.
- The topic ‘Plugin not working – Full folder path appended to website URL’ is closed to new replies.