Closed (fixed)
Project:
jQuery Update
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2013 at 00:03 UTC
Updated:
15 May 2013 at 21:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
lucascaro commentedDebugging this I realized that when doing an ajax call from the backend, jquery_update has no way to know and attempts to load the frontend version of jquery, causing an error and breaking ajax calls.
current_paths for ajax calls might not be marked as admin paths, but they need to use the same jquery version as the original page.
Comment #2
lucascaro commentedThis might be related to #1957782: ['ajax_page_state']['jquery_version'] not sent back to the server
Comment #3
lucascaro commentedI've found an error on jquery_update.module:207
The if clause is using a undefined variable, it should be using $ajax_version instead.
I also had to add the following script to make it work (inspired on http://drupal.org/node/1957782):
With these two changes it's working on my end. Ill post a patch ASAP.
Comment #4
lucascaro commentedHere's the patch:
Comment #5
Punk_UnDeaDdon't use drupal_add_js
it fix for drupal.ajax library, not an independent file
use something like
Comment #6
lucascaro commentedre-roll with the change from #5
Comment #7
ericduran commentedHmm, The beforeSerialize shouldn't be require. That is why I added the POST check.
How is the Ajax request being made? If the ajax request is properly being done using Drupal Ajax system the post value should be there.
I'm going to need to test this before this patch can be added.
Comment #8
Punk_UnDeaDnot all data collect to send
only ajax_html_ids, ajax_page_state[theme], ajax_page_state[theme_token], ajax_page_state[css] and ajax_page_state[js]
see Drupal.ajax.prototype.beforeSerialize
Comment #9
ericduran commented@Punk_UnDeaD Ahh, It's because I only tested with ajax forms which does return the entire Drupal.settings.
Reviewing the patch now.
Thanks.
Comment #10
ericduran commentedWe should actually change the weight to go right after the ajax script.
Lets not leave the weight the same to make it clear that we want that specific order.
The rest looks good.
Thanks all.
Comment #11
ericduran commentedI made some changes. I made sure our ajax fix is only on the drupal ajax js and made sure it's always after it.
This is now fixed.
Thanks.
--
http://drupalcode.org/project/jquery_update.git/commit/7b66e73