WordPress.org

Support

Support » Plugins and Hacks » Quotes Collection » Patch to work with multisite and domain mapping

Patch to work with multisite and domain mapping

  • Running quotes collection on multisite with the domain mapping plugin. When clicking Next Quote for ajax request, get a javascript error: cross domain.

    The problem is that the quotes collection plugin sends a request to the full internal domain, i.e. example.multisiteinstallation.com, when it needs to send the request to example.com. Results in cross-domain error, so no quote loads via ajax.

    In quotes-collection.php, I’ve updated the plugin url code that’s output in the head.

    <br />
    ...<br />
    function quotescollection_js_head()<br />
    {<br />
            //if ( !defined('WP_PLUGIN_URL') )<br />
                    $wp_plugin_url = get_bloginfo( 'url' )."/wp-content/plugins";<br />
            //else<br />
            //      $wp_plugin_url = WP_PLUGIN_URL;</p>
    <p>        global $quotescollection_auto_refresh_max, $quotescollection_next_quote;<br />
            ...<br />
    }<br />
    ...<br />

    Also applied this to the css file for consistency.

    Please fold these changes into the next update. I don’t believe that you’ll need to check for WP_PLUGIN_URL, as get_bloginfo() should always work.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Srini G

    @srinig

    Thanks! This problem won’t occur in the upcoming version of the plugin.

    Awesome! Thanks Srini.

    I also noticed the other day (not on a domain mapper multisite install), that the plugin loaded its script/css assets over http, when the rest of the site assets were loaded via https. I was going for https, but this plugins’ assets kept the page from being secure.

    I’ll dig in to the files soon to fix it and will post back.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Patch to work with multisite and domain mapping’ is closed to new replies.
Skip to toolbar