Quotes Collection
Patch to work with multisite and domain mapping (3 posts)

  1. jevets
    Posted 4 years ago #

    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.


  2. Srini G
    Plugin Author

    Posted 4 years ago #

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

  3. jevets
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Quotes Collection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic