WordPress.org

Support

Breaks file paths

  • Found this issue and narrowed it down to this plugin.

    I noticed the following error at my site. Site is 9 letters long

    my admin site is files.asdfasdfa.com

    I noticed if I preview a page I get code like:

    <script type=’text/javascript’ src=’http://files.asdfasdfa.com/folder/wp-includes/js/underscore.min.js?ver=1.4.0′></script>
    <script type=’text/javascript’ src=’http://files.asdfasdfa.com/folder/wp-includes/js/backbone.min.js?ver=0.9.2′></script>
    <script type=’text/javascript’ src=’http://s0.wp.com/wp-content/js/postmessage.js?ver=2.1.1-201305′></script>
    <script type=’text/javascript’ src=’http://files.asdfasdfa.com/data/plugins/jetpack/_inc/spin.js?ver=1.2.4′></script>
    <script type=’text/javascript’ src=’http://files.asdfasdfa.com/data/plugins/jetpack/_inc/jquery.spin.js?ver=3.5.1′></script>

    <link rel=’stylesheet’ id=’sharedaddy-css’ href=’http://files.asdfasdfa.com/data/plugins/jetpack/modules/sharedaddy/sharing.css?ver=2.1.1′ type=’text/css’ media=’all’ />

    In real life I get code like:

    <script type=’text/javascript’ src=’http://asdfasdfa.com/wp-includes/js/underscore.min.js?ver=1.4.0′></script>
    <script type=’text/javascript’ src=’http://asdfasdfa.com/wp-includes/js/backbone.min.js?ver=0.9.2′></script>
    <script type=’text/javascript’ src=’http://s0.wp.com/wp-content/js/postmessage.js?ver=2.1.1-201305′></script>
    <script type=’text/javascript’ src=’http://asdfasdfa.coms?ver=1.2.4′></script>
    <script type=’text/javascript’ src=’http://asdfasdfa.coms?ver=3.5.1′></script>

    <link rel=’stylesheet’ id=’sharedaddy-css’ href=’http://asdfasdfa.comy/sharing.css?ver=2.1.1′ type=’text/css’ media=’all’ />

    Notice the domain change to comy and coms due to text cutoff. Basically breaks most plugins.
    Turn off thiis plugin and it all works fine.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The problem is in
    function domain_mapping_plugins_uri( $full_url, $path=NULL, $plugin=NULL ) {

    PLUGINDIR is set to “wp-content/plugins” but on my site it is “data/plugins”

    Looks like it’s in default-constants.php

    /**
    * Allows for the plugins directory to be moved from the default location.
    *
    * @since 2.1.0
    * @deprecated
    */
    if ( !defined(‘PLUGINDIR’) )
    define( ‘PLUGINDIR’, ‘wp-content/plugins’ ); // Relative to ABSPATH. For back compat.

    Plugin Author Ron Rennick

    @wpmuguru

    Right, so define PLUGINDIR in your wp-config.php to point to the correct path.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Breaks file paths’ is closed to new replies.
Skip to toolbar