The JavaScript exception "variable is not defined"

25 views
Skip to first unread message

Moe Shakeri

unread,
Nov 23, 2024, 8:24:22 PM11/23/24
to web...@googlegroups.com
Hi all, 

I recently upgraded my application to Python 3.9 and it's now running on web2py 2.27. I had an issue with "LOAD with Ajax" where the dynamic content could not be rendered. I resolved this issue by replacing web2py.js in my app with the one in the welcome app and clearing the browser cache. 

However, I have issues with web2py's paginate as well as search capabilities. It cannot go through when I click on the pagination link to view the next rows on the same page. Similarly, when I use the search menu to look for a specific entry in a table, after creating the new search, it cannot go through to render the requested row on the same page. Below is the js traceback captured from the browser network tab for case 1 and case 2, respectively. The common error for both is "Uncaught ReferenceError: w2p_ajax_disable_with_message is not defined". The only place where w2p_ajax_disable_with_message is referenced is in web2py.js, which as I mentioned above was copied from the welcome app. 

Case 1:
Uncaught ReferenceError: w2p_ajax_disable_with_message is not defined
    disableElement https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:600
    a_handlers https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:739
    jQuery 7
    fire https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:579
    beforeSend https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:396
    ajax jQuery
    ajax_page https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:368
    a_handler https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:714
    a_handlers https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:723
    jQuery 7
    <anonymous> https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/bootstrap.min.js:6
    <anonymous> https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/bootstrap.min.js:6
web2py.js:600:61


Case 2:
Uncaught ReferenceError: w2p_ajax_disable_with_message is not defined
    disableElement https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:600
    trap_form https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:333
    jQuery 7
    trap_form https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:353
    jQuery 7
    trap_form https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:346
    jQuery 2
    trap_form https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:313
    complete https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:415
    jQuery 6
    ajax_page https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:368
    component https://loop3.cheetahloop.com/CheetahORSwebUI/static/js/web2py.js:467
    jQuery 11
web2py.js:600:61

Appreciate it if anyone could help to fix this issue.

Moe


Reply all
Reply to author
Forward
0 new messages