WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Search by My Solr Server
bug - jQuery error when using with Pods plugin (6 posts)

  1. dwconcepts
    Member
    Posted 1 year ago #

    I have 2.0.4 installed with Pods v2.2 plugin and and I receive the error below. This jQuery error will not allow me to change tabs withing the Pods UI.

    Uncaught TypeError: Object function (p_val) {
            var l = this.length;
            for(var i = 0; i < l; i++) {
                if(this[i] == p_val) {
                    return true;
                }
            }
            return false;
        } has no method 'replace'

    http://wordpress.org/extend/plugins/advanced-search-by-my-solr-server/

  2. Scott Kingsley Clark
    Member
    Posted 1 year ago #

    Is the Advanced Search by Solr Server plugin loading it's JS on every single admin page apart from it's own?

  3. dwconcepts
    Member
    Posted 1 year ago #

    Yes. It looks like the jQuery code block is being added to all admin screens via the admin_head action.

  4. dwconcepts
    Member
    Posted 1 year ago #

    I added an if statement around the jQuery code block so the code is only added when the solr settings page is displayed. This fixed the issue until the next version is released.

    if (isset($_GET['page']) && $_GET['page'] == 'MySolrServerSettings'):

  5. dbejean
    Member
    Plugin Author

    Posted 1 year ago #

    Hi dwconcepts,

    Can you explain where exactly you put this line of code ?

    Thank you.

  6. Forest_Parks
    Member
    Posted 8 months ago #

    So glad I found this.... Was driving me insane! I was commenting out the js and renabling when I needed to save stuff in the plugin!

    I added this

    <?php if (isset($_GET['page']) && $_GET['page'] == 'MySolrServerSettings'): ?>
    <script type="text/javascript">
    ==== REST OF JAVASCRIPT IN HERE===
    </script>
    <?php endif; ?>

    Seems to be working for me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags