Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @umairkamil

    You are completely right and we already released a new update fixing this issue

    In a few minutes, you should be able to update it directly from your WordPress install

    Thank you so much for your report

    Best regards

    Hi there, I have updated the plugin to the latest version (1.6.3.1) and this issue is occurring for me. Deactivated, deleted, and reinstalled just to make sure – still persists. Thanks for looking in to this.

    Screenshot:
    https://drive.google.com/open?id=17i6dcjm2DyE1xzSw1yeEN5h65ZCxB4ks

    Inspecting the element yields the following errors:

    Uncaught TypeError: Cannot read property 'trim' of undefined
        at gamipress_select2_optgroup_matcher (gamipress-admin-functions.min.js?ver=1.6.3.1:10)
        at SelectAdapter.matches (select2.js:3271)
        at HTMLOptGroupElement.<anonymous> (select2.js:3131)
        at Function.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,wp-util,wp-a11y,updates,wp-ajax-response,thickbo&load[]=x,jquery-ui-core,jquery-ui-mouse,shortcode,moxiejs,plupload&ver=4.9.9:2)
        at a.fn.init.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,underscore,wp-util,wp-a11y,updates,wp-ajax-response,thickbo&load[]=x,jquery-ui-core,jquery-ui-mouse,shortcode,moxiejs,plupload&ver=4.9.9:2)
        at SelectAdapter.query (select2.js:3122)
        at Select2.<anonymous> (select2.js:5229)
        at Select2.Observable.invoke (select2.js:623)
        at Select2.Observable.trigger (select2.js:613)
        at Select2.trigger (select2.js:5331)
    • This reply was modified 5 years, 11 months ago by peeld.
    • This reply was modified 5 years, 11 months ago by peeld.
    • This reply was modified 5 years, 11 months ago by peeld.
    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @peeld

    I just tried to reproduce your error at looks like another plugin is loading an outdated version of a library that GamiPress uses to build this dropdown

    In order to confirm this, we just launched a new update that adds more info on the System Info tool (located at GamiPress -> Tools -> System Info) with information about this library (you will see a green or red text advertising you if this library is correctly up to date)

    Best regards

    Thanks! I have red text under the Select2 library. Please advise.

    It looks like it’s pulling select2.js from my theme (Thrive Themes Focus Blog) and that version included is indeed NOT the latest version. I’ve contacted the themes folks for an update. However not sure that will matter:

    I updated the select2.js file to the latest stable version, 4.0.5, and in an incognito window loaded up the admin page, and it IS pulling that version of select2.js, but Gamipress still says it’s outdated?

    Then, I looked in the Gamipress folder, looks like 4.0.3 is included. Copied over select2.js 4.0.3 from Gamipress to my theme’s folder, loaded up the admin page (edit a badge) in an incognito window. Verified that the version 4.0.3 select2.js file is being pulled. It is. However it still doesn’t work, and Gamipress tools still reports the library as being outdated.

    Sorry, trying to provide as much info as possible, and a bit frustrated it’s not working.

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @peeld

    If you copied the version from GamiPress it should work,

    anyway, with this outdated report the dropdown gets fixed after copy it on your theme?

    If not, probably issue could come that another plugin is loading it

    To quickly find which plugin is loading this asset perform the following steps:
    1 – Open your browser console (F12)
    2 – Press Ctrl + F (or CMD + F) and search “select2”
    3 – For sure you got some results, look for the result that comes from a “<script>”
    4 – Check the URL from where is loading this script, you should see smething like https://yourwebsite.com/wp-content/plugins/plugin-folder/js/select2.js

    This route can change, but the important part is the “plugins/plugin-folder” that will advice you from which is getting loaded Select2

    Best regards
    Ruben

    Hi there. Copying select2.js from Gamipress did not fix the issue. The new select2.js gets loaded by the theme but it still doesn’t work for Gamipress, sadly. It’s not being loaded by another plugin, just the theme.

    I looked at the code in your version checking function and it looks like it’s only checking for version 4.x vs 3.x anyway, and since we are talking about 4.0.2 vs 4.0.3, shouldn’t it still verify as up to date?

    Regards

    In the meantime to get the events dropdown to function, I have edited the gamipress-admin-functions.js file like so:

        // Always return the object if there is nothing to compare
    
    //    if ( $.trim( params.term ) === '' ) {
    
            return data;
    
    //    }
    

    Also edited the minified file accordingly so I could turn off script debugging.

    • This reply was modified 5 years, 11 months ago by peeld.
    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @peeld

    Thank you so much for your depth report

    Finally we got the issue that comes from a wrong usage of the jQuery variable “$”

    To quickly explian it to you, in some installs could work the user of the “$” that is an abbreviation of “jQuery”, but the safe and secure option is use the “jQuery” variable (this means that instead of $.trim(), we should be use jQuery.trim())

    We just did the change and we submitted a new update fixing it

    Best regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Unable to fetch Gamipress Events’ is closed to new replies.