Hey Guys, when working in views I noticed I kept getting and error like "An error occurred at /mysite/admin/build/views/ajax/display/" when clicking on any of the UI buttons.
Also, in addition to views Ive noticed that all drag n drop menu bars and such have lost their ajax functionality as well. For example if I go to admin -> blocks or admin -> content type -> manage fields I can not move/sort the items with drag n drop.
All my sites get updated to the latest jquery and it seems the jquery 1.4.2 is causing some issues with views in all of my sites.
From what I can tell it seems the latest version of jquery (v1.4.2) is causing site wide ajax functionality loss.
Ive looked for a solution other than reverting back to older jq library but haven't found anything. And I can't revert my jq library because all my other jquery scripts need this latest version or at least a few of my scripts do.
Has anyone else tested this to verify?
Thanks!
Comments
Did you use the jQuery Update
Did you use the jQuery Update module or just replace jQuery?
I just replaced it. I didnt
I just replaced it. I didnt even know there was an update module. Im going to try it now.
Thanks!
Hey Nevets, well I tried the
Hey Nevets, well I tried the jquery update module since its descritption says it will always use the latest jquery version so I thought it would just convert the script link to:
But it comes with the same version of jquery that is part of drupal core, version 1.2.6.
I tried updating that file in the update module and the problem still persists. All site wide ajax is gone when ever drupal uses jquery 1.4.2.
Are you running jquery 1.4.2 successfully on any of your sites?
Any other suggestions?
Thanks!
Did you read the project page
Did you read the project page or check the issue queue? version 2 for d6 supports 1.3 and there's an issue in the issue queue for 1.4.
Hey WorldFallz, I just ended
Hey WorldFallz, I just ended updated to 1.3 and all seems work.
Thanks!
JQuery_Update module and 1.4.2
I have JQuery_Update module and use JQuery_1.3.2.
I wanted to update it with JQuery 1.4.2.
Only 2 files to replace I thaught. See #685060: Get ready for 1.4
But same problem, Views UI doesn't work anymore
------------------------------------------------
http://www.ilemaurice-bonplan.com
Same problem here, JQuery
Same problem here, JQuery 1.4.2 breaks the ajax.
_
Which is why you can't just update the jquery included with core and the reason the jquery_update module exists in the first place. If you want to speed up the upgrade participate in the linked issue.
Same problem
Same problem here
www.edigitalstudios.com
Jquery 1.4.2 update fails content type fields rearrangement
Hi All,
Same problem here.. I just went back to jquery 1.3.2. This works. Sorry, no time for the patch people provided. I hope it will be in the next update.
Thanks for all the effort!!!!
Temporary fix
Hi,
I got the same problem (need jquery 1.4.2 *and* Views).
A temporary fix to allow using Views UI is to disable Javascript for Views through "admin/build/views/tools".
It should at least allow you to create/modify your views.
The worst of it all: i don't
The worst of it all: i don't need the old jquery in my project at all. I only need the latest version. So now i am stuck with 1.2 just because in the BACKEND theme, the upgrade won't work.
My backend theme is garland, my frontend is custom made which does not even need to display the views administration and the like.
IMHO integrating a jquery library into the core is a major mistake.
Is there not a way to load a jquery lib dependent on the theme being used?
_
It's not tied to the theme, it's tied to core drupal. In the /misc directory you'll find all the core js that uses jquery. If you want to be able to provide core jquery based js then you have to include the compatible version of jquery with core. The jquery_update module exists exactly as a means of upgrading that between major drupal releases. If jquery_update isn't releasing as fast as you'd like, you're free to help it along. ;-)
That's exactly my point. It
That's exactly my point. It is tied to the core. So i am stuck with it. But why? When i create my theme for the page i am building, what do i care about the core functionality that uses jquery 1.2?
I am not able to use the latest nitty gritty stuff for the page i am building without hassle. I see that the administrative pages are only compatible with the old version, but why should i care about it for the frontend?
I can insert the new libs manually but still the old lib is being loaded creating useless overhead.
Partial solution
This issue hints at a partial solution
http://drupal.org/node/775924
New JavaScript security?
I recently had a problem similar to this on a non-Drupal project. I noticed it in jQuery 1.4.2, but it may have started back in 1.4. I was retrieving JSON via an AJAX call and realized jQuery changed the parsing method. It now uses the built in browser parser instead of the less secure eval() function. However, this means that the received code must be valid JSON. Here are two examples:
This is valid JavaScript but not valid JSON:
[ { foo: 'bar', test: 1 } ]
Here is the valid version:
[ { "foo": "bar", "test": "1" } ]
Notice how everything is quoted in double quotes. If this isn't the case then your AJAX call will fail. My guess is that this is what the Views module is doing (or to be more precise, not doing). I could be off the mark, but this is my best guess without diving into the core and Views code.
My Solution
I had the same problem, and ended up hacking the module a little bit, to fit my install.
*** Solution assumes using the jQuery Update Module ***
Essentially I added the following lines to the jquery_update_preprocess_page() function inside modules/jquery_update/jquery_update.module:
Like this:
In your case, since you have it installed in "mysite" folder, you'd need to modify it slightly:
If you need more details, see my blog post about it at: http://www.widgetsandburritos.com/technical/programming/drupal-admin-jquery-update-module/.
You have my idea ;)
@idworld: I faced the same problem, and i also think about the way you've done, use two jquery version, latest version on homepage and 1.2.6 on admin page.
There are another way can be shorten the code to check admin (if you dont change location to admin). instead of check pattern we just check for arg(0) == "admin". We can use this way for subfolder also. ^_^
/**
* Implementation of moduleName_preprocess_hook().
*
* Replace Drupal core's jquery.js with the new one from jQuery Update module.
*/
function jquery_update_preprocess_page(&$variables) {
// Only do this for pages that have JavaScript on them.
if (!empty($variables['scripts'])) {
// Custom modification to prevent it from running in admin panel
if (arg(0) == "admin") return;
...
thank you guys !
thank you guys !
this is still a problem with
this is still a problem with views + drupal 6 using jquery 1.4.4