Attached patch adds a drupal alter call above the JS replacements, and also adds the path to the jquery_update_get_replacements function, so that modules can specify their own files, path and all.

Comments

mfer’s picture

There is already an issue open on this :). I know, I opened it.

I'll review and work through this. Thanks.

robloach’s picture

Version: 6.x-1.1 » 7.x-2.x-dev

Where's that issue, Matt?

silurius’s picture

Subscribing.

markhalliwell’s picture

Marked #792798: Allow other modules to also preprocess JavaScript as a duplicate of this issue. And subscribing.

klonos’s picture

subscribing...

mfer’s picture

Status: Needs review » Postponed (maintainer needs more info)

With the existing core hooks of hook_library_alter() and hook_js_alter() do we need another method? In Drupal 6 this makes sense. But, for Drupal 7 is there anything we need to do?

amateescu’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Needs review

Certainly not. Moving back to 6.x.

kenorb’s picture

webdevbyjoss’s picture

Hi, i'm experiencing problem while rewriting the JS in my theme page preprocess function. jqury_update module ignores my rewrites and restores previous list of JS files.

If this patch safe to use?
Can I apply it in my project?

Will it be pushed to module?

djbobbydrake’s picture

Used the patch. Works! Had to set $replacements['module'][$path] to null.

kenorb’s picture

StatusFileSize
new1.47 KB

I've updated patch to the latest version.
Also removing JQUERY_UPDATE_REPLACE_PATH and it seems it's nowhere defined.

markhalliwell’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Drupal 6 reached EOL (end-of-life) on February 24, 2016.