WordPress.org

Forums

Codestyling Localization
[resolved] Sites with alternate wp-content locations - cs not happy withself (4 posts)

  1. anmari
    Member
    Posted 2 years ago #

    Thanks for great plugin, altho i'd love it even more with less js dependecy

    Seems fine in 'normal' wp install, but not on second test site wp2 which shares wp/wp-content (I share wp-content so I can test my plugins on beta and official wp versions).

    Plugin not happy with self:

    Malfunction at dubious external scripts detected !
    Reason: unknown external script has been enqueued or hardly attached. | Polluter: unknown (probably by Theme or Plugin)
    Below listed external scripts have been traced, verified and automatically stripped because of injection:
    [hook:admin_head#2] - http://localhost/wp/wp-content/plugins/codestyling-localization/js/prototype.js
    [hook:admin_head#3] - http://localhost/wp/wp-content/plugins/codestyling-localization/js/wp-scriptaculous.js
    [hook:admin_head#4] - http://localhost/wp/wp-content/plugins/codestyling-localization/js/effects.js
    This page will not work as expected because 1 file could not be get from CDN. Check and update the Plugin doing your CDN redirection!

    http://wordpress.org/extend/plugins/codestyling-localization/

  2. codestyling
    Member
    Plugin Author

    Posted 2 years ago #

    How did you configure this sharing of the content folder?
    It looks like a local Apache test system. I would need any modifications as description to be able to reproduce it at my local dev environment.

  3. anmari
    Member
    Posted 2 years ago #

    Hi Heiko,

    See http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

    in wp-config.php, add these lines

    define( 'WP_CONTENT_DIR', 'C:\wamp\www\wp\wp-content' );
    define( 'WP_CONTENT_URL', 'http://localhost/wp/wp-content');

    I use to have:
    //define( 'WP_PLUGIN_DIR', 'C:\wamp\www\wp\wp-content/plugins' );
    //define( 'WP_PLUGIN_URL', 'http://localhost/wp/wp-content/plugins');
    but too many plugins don't cope with that at all.

    Many plugins don't know about these (or even worse partially cater for them). Sharing the user table is also fun to do (NOT :-)) especially when a membership plugin seems to cater for it (using $wpdb->, but not everywhere!

    regards, anmari

  4. codestyling
    Member
    Plugin Author

    Posted 2 years ago #

    The definition does not contain all necessary replacements. Let's say, you want to replace the wp-content folder with my-playground folder.
    Than you modifiy the wp-config.php file below the already existing first 3 lines:

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    define( 'WP_CONTENT_DIR', ABSPATH . 'my-playground' );
    define( 'WP_CONTENT_URL', 'http://wp35.test/my-playground'); // full url - WP_CONTENT_DIR is defined further up
    define( 'PLUGINDIR', 'my-playground/plugins' );
    define( 'MUPLUGINDIR', 'my-playground/mu-plugins' );

    All other directory constants will now be created appropriated by WordPress startup process and will work as expected.

    Keep in mind, I'm using local vhosts with my Apache, so I have the domain "wp35.test" locally as a vhost. It also works for appropriated configured localhosts but I would always prefer vhost usage locally.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.