last 6 month I fix jquery_update

add support jQuery 1.7, 1.8, 1.9, jQuery UI 1.9
fix version on admin part, resolve problem ajax_delivery
add jquery.migrate

sorry, I'm russian, my english is bad

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobLoach’s picture

Status: Active » Needs review

Thanks!

Plazik’s picture

Status: Needs review » Needs work

Make a patch.

---

Сделай патч, так его быстрее закомитят.

aendra’s picture

FileSize
14.1 KB

So, this is patched against a -dev copy (7.x-2.1+9-dev to be precise) and contains a "temp" directory, the contents of which are as follow:

a. libraries directory containing directory "jquery.migrate".
b. modules directory containing aforementioned jQuery update folder, Libraries and Libraries Loader.

Attaching a diff between this and the current commit of the 7.x-2.x branch (baff5d15a438cfa8216997e067518f3c1a28bd5e)...

Krit’s picture

If anyone comes across an error

Notice: Undefined index: installed in libraries_load() (line 604 of
......../sites/all/modules/libraries/libraries.module).

This error happens when trying to access an index of an array that doesn't exist.
So to fix this we will check the existence of the index before any further processing in the module

Try
1) Go to file libraries.module (Open with text editor that support line numbering)
2) locate the line that causes the error (in this case is 604)
3) In this case the line should look like 604 --- if ($library['installed']) {
4) Change the line to 604 --- if (isset($library['installed'])) { //Notice the PHP in-built isset()
5) Done (The error is now gone and seems like everything works fine)

**Please correct me or notify whether this can cause undesirable consequences. Hope this comes helpful to everyone

Punk_UnDeaD’s picture

i'm sorry
I use hacked libraries module
jquery.migrate.libraries.info placed in jquery.migrate folder
but must be placed in libraries folder

aendra’s picture

FWIW, everybody -- you really shouldn't hack Libraries. I've successfully used Libraries in tonnes of modules; if you're having issues with it, it's most likely a problem with your code and not Libraries itself.

Edit: See below. The issue with the notice has to do with the library being improperly defined.

Krit’s picture

So now I'm in this situation of using a hacked module? If then how to use this without using a hacked module?
Maybe you have already given out solutions on this...If you guys did sorry for me being dumb

aendra’s picture

@Krit -- The changes you made to Libraries won't do what you necessarily expect them to. Wrapping $libraries['installed'] in an isset() means the condition will evaluate only on whether isset() is true; not whether $libraries['installed'] itself is true.

In other words, even if $libraries['installed'] = false, isset($libraries['installed']) will return "true".

Easiest way to revert is to download the latest copy of libraries from http://www.drupal.org/project/libraries

If you want to save your modified version, create a directory outside your modules directory (I.e., "sites/all/disabled") and move your current version of libraries there. You can then download a fresh copy into sites/all/modules without your old version affecting it.

This is super in-development right now; unless you're wanting to bug-test this hardcore (And again, I'm not really sure whether the route taken by the original poster is the right one), find another way of using jQuery 1.9.

aendra’s picture

FileSize
1.35 MB
1.37 MB

My last diff was against the latest dev; here's one against the 2.1 branch. I also did a diff between 2.1 and the current 2.x branch (2.3-alpha1) -- it's like 37,000 lines. :|

I'm really unfamiliar with interdiffs; would there be any way of using one to get the changes between 2.3 and 2.1, getting the changes between this attempt and 2.1, and then merging the two? Because otherwise it will involve porting all the changes from the first diff diff over to 2.3.

@Punk_UnDeaD -- You declared your library with a .info file... Libraries doesn't work like that. There's an issue from 2011 in that direction, but AFAIK, libraries requires you to use hook_libraries_info() (Which is documented in libraries.api.php).

Also, in the future? Please, *please* don't develop like you did for this one. Always download the latest module version via Git, which also incidentally allows you to create .patch files really easily. This issues would almost be much further along had you done that! :) For info on how to do all this, please read: http://drupal.org/node/707484

(That all said -- thanks for your work on this!)

ericduran’s picture

Status: Needs work » Closed (duplicate)

This issue doesn't really apply.

There's already an issue to update to the latest version of jQuery UI: #1947438: Update jQuery UI to the latest version (1.10.2)
1.7 and 1.8 are already in the dev version and there's specific issue for jQuery 1.9.