Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In released Drupal 7.39 new function Drupal.urlIsLocal to misc/drupal.js file was added. This function is missed in LABjs replace/drupal.js file, so all AJAX behavior fails due to the "Uncaught TypeError: Drupal.urlIsLocal is not a function" error.
Proposed resolution
Add missed Drupal.urlIsLocal and additional Drupal.absoluteUrl function to the LABjs version of drupal.js file.
Comment | File | Size | Author |
---|---|---|---|
#2 | labjs-drupal_js_file_upgrade-2561797-1.patch | 2.41 KB | Oleksiy |
Comments
Comment #2
OleksiyComment #3
ogursoy CreditAttribution: ogursoy commented#2 works. Thanks alot.
Comment #4
cristianalcaraz CreditAttribution: cristianalcaraz commentedCan confirm #2 works. Thanks!!!
Comment #5
vyasamit2007 CreditAttribution: vyasamit2007 as a volunteer and at Blisstering Solutions commentedI've applied the patch on 7.x-1.6 and the patch works perfectly and resolves the issue.
Thanks!!
~Amit
Comment #6
drupalpal CreditAttribution: drupalpal commentedI had a problem in the ajax popup modal in views administration; It didn't show up. I have been searching for 5 days for a solution until I found this. I have now disabled the Labjs module and it is now working!
Thank you!
Comment #7
himanshupathak3 CreditAttribution: himanshupathak3 as a volunteer and at Srijan | A Material+ Company commented@drupalpal
Thanks for your comment
#6 worked for me. Disable lab JS
Comment #8
jcisio CreditAttribution: jcisio commentedThe bug was found several months ago and committed a month ago (slightly different from the patch above). I couldn't say anything here because due to a security release. It was delayed because we had to synchronize the release of core and several similar contrib modules. Now it's done. Thanks all.
Comment #10
henrikakselsen CreditAttribution: henrikakselsen as a volunteer commentedIf someone should stumble on this issue: Turning ON javascript aggregation on admin/config/development/performance/ actually solved my issue with this ajax error. In my case we're not using the LABjs module, so it seems like it can be triggered by other issues too.
I suspect it could be a mismatch in variable names when using a jquery update and the aggregation is not 'aligned'.