I'm using hook_js_alter() to replace D7 jquery with jquery 1.7 and it seems this breaks the ajax functionality of filefield uploads on node edit form. That is, when you select a file and hit upload, you get the spinner and it just sits there. If you hit preview, it shows that the file uploaded correctly. Then if you click remove, you get an infinite spinner again, and hitting preview here will show that the file was actually removed.

Tried loading jQuery 1.5.2 with this method as well since its the version included in jquery_update, and have the same problem.

Funny thing is, I don't get this problem when loading jQuery 1.7 with the dev branch of jquery_update. Am I missing something else that needs to be modified? I have the following code in my template.php file.

function mytheme_js_alter(&$js) {
	if (isset($js['misc/jquery.js'])) {
		$jsPath = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';
		$js['misc/jquery.js']['data'] = $jsPath;
		$js['misc/jquery.js']['version'] = '1.7.2';
	}
}

Trying to avoid using jQuery update b/c I only need jquery 1.7 on the front end. I realize the easy fix would be to use the admin theme for content editing, but thats not an option at the moment. Any ideas?

Comments

nevets’s picture

jQuery Multi sounds like it will help.

tasc’s picture

but no ideas either...