WordPress.org

Ready to get started?Download WordPress

Forums

WP Deals
jQuery blockUI error do to new jQuery v1.10.2 in wordpress 3.6 (27 posts)

  1. vistazifta
    Member
    Posted 11 months ago #

    jQuery blockUI has a bug that that drops the zero on the version check so it validates v1.10.2 as v1.1.2 vs the old 1.2.3 and shows up as non valid.

    I'd fix it myself except i have no clue where in the plugin it uses blockUI.

    http://wordpress.org/plugins/wp-deals/

  2. vistazifta
    Member
    Posted 11 months ago #

    Ok so the infringing file is wpdeals_plugins.js found in the "wpdeals-assets > js" folder i tried replacing the entire file with a renamed jquery.blockUI.js but its to different. Would anyone know how to contact the auther and ask for a fix?

  3. jason1234h
    Member
    Posted 11 months ago #

    I was told to use JQuery Updater but it doesn't seem to fix it.

    http://wordpress.org/plugins/jquery-updater/

  4. craynkshaft
    Member
    Posted 11 months ago #

    +1

  5. joselo4
    Member
    Posted 11 months ago #

    I am interested on this too

  6. CandorZ
    Member
    Posted 10 months ago #

    If you know what you are doing then you may:

    comment the if that checks the jQuery version using /*...*/
    The following needs to be commented in:

    wpdeals_plugins.js and wpdeals_admin.js

    if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    	alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
    	return;
    }
  7. elvinlee
    Member
    Posted 10 months ago #

    Hi CandorZ,

    I had comment it in wpdeals_admin.js, I can't find any code about the IF in wpdeals_plugin.js.

    However, I still receive the alert at WPDeals panel.

  8. elvinlee
    Member
    Posted 10 months ago #

    Updated It's work after few times refresh.

    By the way, I had set 10 vouchers code, but when I try buy 2 vouchers, email and account list only show 1 voucher code. Anyone know the solution?

  9. Michael C
    Member
    Posted 10 months ago #

    I have the WP Deals Plugin and cannot find wpdeals_plugin.js can someone share the file path for this file? Im having the same issue as everyone else.

  10. Michael C
    Member
    Posted 10 months ago #

    Ok I found it :)
    wp-content/plugins/wp-deals/wpdeals-assets/js/wpdeals_plugins.js

  11. Michael C
    Member
    Posted 10 months ago #

    Commenting out the If statements in those 2 files did not fix the problem?

    This is the wpdeals_admin.js

    ;(function($){ /*if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later! You are using v'+$.fn.jquery);return;} */

    How would I fix the jQuery issue? Once I commented out those if statements the back end works fine but I now get the popup on the front end.

    Sincerely,
    Michael

  12. Michael C
    Member
    Posted 10 months ago #

    Alrighty So now it works.....?
    :D :D :D :D :D
    Refresh issue???

  13. gnfb
    Member
    Posted 10 months ago #

    Is there a definitive answer to this problem yet?

  14. Mikhail_S
    Member
    Posted 10 months ago #

    Write a step by step - how to solve this problem

  15. gnfb
    Member
    Posted 10 months ago #

    can one of the clever ones tell us if this problem is secific to the plugin ? if so maybe we should ask the creators for a fix. I have used the jquery update plugin and it doesnt seem to affect the fornt end its just annoying on the back end

  16. CandorZ
    Member
    Posted 10 months ago #

    It's something to do with the REGEX

    if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery))

    which is checking the version of JQuery

    You are free to resolve it or comment out the

    if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;

    in wpdeals_admin.js
    and

    if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    	alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
    	return;

    in wpdeals_plugins.js

    I have already informed the developer

  17. gnfb
    Member
    Posted 10 months ago #

    didnt work for me I // commented out the lines
    in files
    wpdeals_admin.js
    and wpdeals_plugins.js
    in

    wp-content/plugins/wp-deals/wpdeals-assets/js
    wp-content/plugins/wp-deals/wpdeals-assets/js/admin

    still get same response

  18. CandorZ
    Member
    Posted 10 months ago #

    Any one having the problem can download the js files from:
    Edited JS (ZIP)

    I am also involved in active development of WPDeals (Part time, ofcourse)
    so don't hesitate to drop me a mail...

  19. yippee12
    Member
    Posted 10 months ago #

    Hello,

    I tested the payment procedure with the bank transfer and the customer receives this message

    Your order is complete. Your order's details are below:

    Order #: 87

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/41/11478641/html/ja/wp-content/plugins/wp-deals/wpdeals-classes/order.class.php on line 307 and defined in /home/content/41/11478641/html/ja/wp-includes/wp-db.php on line 992

    My question would be what needs to be fixed and where?

  20. yippee12
    Member
    Posted 10 months ago #

    THank you Candor. I have used your fixed files but I get this error message from the message here above.

  21. CandorZ
    Member
    Posted 10 months ago #

    Looks like a pretty generic error. It has been described well here
    You need to modify your code
    $results = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."wpdeals_permissions WHERE user_id = $this->user_id AND order_key = '$this->order_key' AND deal_id = $item_id" ));
    to
    $results = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."wpdeals_permissions WHERE user_id = $this->user_id AND order_key = '$this->order_key' AND deal_id = $item_id",0));
    or
    $results = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix."wpdeals_permissions WHERE user_id = %d AND order_key = %s AND deal_id = %d",$this->user_id,$this->order_key,$item_id));

    Do take care of %d and %s while using the above one...

    And do drop a link of your production site.

  22. dragnoir
    Member
    Posted 9 months ago #

    Fixed in my side:
    go to
    wp-deals/wpdeals-assets/js/wp-deals/wpdeals-assets/js

    From Line 8, delete this code:
    if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
    return;
    }

    and it's done

  23. Bizcus
    Member
    Posted 8 months ago #

    Which file are you referring to? Please advise

    Fixed in my side:
    go to
    wp-deals/wpdeals-assets/js/wp-deals/wpdeals-assets/js

    From Line 8, delete this code:
    if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
    return;
    }

    and it's done

  24. font21
    Member
    Posted 8 months ago #

    For people, like me, who really need things broken down step-by-step:
    CHANGE THE FIRST FILE
    /wp-deals/wpdeals-assets/js/wpdeals_plugins.js
    in line 8, delete or comment out code by changing from

    if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
    return;
    }

    to

    /*if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
    return;
    }*/

    CHANGE THE SECOND FILE
    /wp-deals/wpdeals-assets/js/admin/wpdeals_admin.js
    in line 14, delete or comment out code by changing from

    (function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}

    to

    /*(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}*/

    I hope this helps and the best of luck to you!

  25. gochum
    Member
    Posted 7 months ago #

    I can't believe this. over 3 months ago this post was created and figured out, that the script is poorly programmed. The script itself is the reason for the failure.
    And the developer has not made it in 3 month to fix such a bug instead let the folks deal with the problem??
    There are so many people out there using WP but there are non IT genius, how are they supposed to fix a malfunction in a script?

    I just decided not to use a poorly writtens cript, period!
    There are other scripts out there which work.

    Sorry just my opinion because it shows that the developer has absolute no interest for the users.

  26. jackinthebox
    Member
    Posted 7 months ago #

    My very first Post in here! :-))

    I am new to WordPress, just buliding a new community site included WPDeal with it. Had this Problem first on yesterday evening as i installed WPDeal.
    This morning i localized the bug by checking some forums. The best solve i found here and i tested it - it worked.
    After that i wrote a friend of mine about the bug - he is working as a developer for WKW, a german social network. In his lunchbreak he wrote back to me i should please give him the malicious code. I did and he just laughed and gave it back to me in some minutes - with the bug fixed.
    Now the script is checking the version with an accuracy of two digits after the decimal point. This solves the problem finally. I owe that guy at least one beer. :-))

    Here ist the code for your interest:

    Just replace in line 8 in:
    /wp-deals/wpdeals-assets/js/wpdeals_plugins.js
    and line 14 in:
    /wp-deals/wpdeals-assets/js/admin/wpdeals_admin.js
    the following
    {if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){
    with
    if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1\./.test($.fn.jquery)) {
    and it will work for You as it does for me!!!

    Lots of greetz
    Jack

  27. meetrockstarsyed
    Member
    Posted 7 months ago #

    No Luck for me too.. commented out that if condition...
    replaced the code as mentioned by Jack..

    Nothing goes my way.. is this something to do with wp version?

Reply

You must log in to post.

About this Plugin

About this Topic