WordPress MU Domain Mapping
Breaks file paths (4 posts)

  1. funsail
    Posted 3 years ago #

    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.


  2. funsail
    Posted 3 years ago #

    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"

  3. funsail
    Posted 3 years ago #

    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.

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.