[Plugin: WPtouch] WPTouch not working when plugins directory not undet wp-content
-
I’m using WordPress 3.1 with some modified configurations.
- WordPress is installed in it’s own directory (lets say it’s installed under /WP/ in my site)
- wp-content is renamed (lets say that it is now called wpc, so the URL would be /WP/wpc/)
- plugins location is moved outside the renamed wp-content (lets say its now called plgs and the URL is /WP/plgs/)
And in this situation WPTouch is broken. As far as I can see from admin interface, WPTouch is trying to include it’s JavaScript and CSS files from plugins directory under renamed wp-content, so the URLs look like:
<script type=’text/javascript’ src=’http://website/WP/wpc/plugins/wptouch/js/ajax_upload.js?ver=3.1′></script>
<link rel=’stylesheet’ type=’text/css’ href=’http://website/WP/wpc/plugins/wptouch/admin-css/wptouch-admin.css’ />Obvioisly these files cannot be found and everything is broken. As far as I understand, the ability to move wp-content and plugins is there since WordPress 2.6 (http://codex.wordpress.org/Version_2.6).
And it’s pretty well documented in wp-config file documentation (http://codex.wordpress.org/Editing_wp-config.php).I look at the code and I see, that WPTouch seems to be completely unaware of this WordPress possibility. 🙁
Look at this code for example:if ( !function_exists( 'compat_get_base_plugin_dir' ) ) { function compat_get_base_plugin_dir() { if ( compat_is_wordpress_mu() && strpos( dirname( __FILE__ ), 'mu-plugins') !== false ) { return compat_get_wp_content_dir() . '/mu-plugins'; } else { return compat_get_wp_content_dir() . '/plugins'; } } }
You should follow instructions given there: http://codex.wordpress.org/Determining_Plugin_and_Content_Directories
Hopefully this can be fixed.
- The topic ‘[Plugin: WPtouch] WPTouch not working when plugins directory not undet wp-content’ is closed to new replies.