Closed (fixed)
Project:
File Framework
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2010 at 20:47 UTC
Updated:
6 Dec 2011 at 08:09 UTC
Jump to comment: Most recent file
Comments
Comment #1
miglius commentedCan you post a reference to the jQuery update module you're using?
Comment #2
filburt commentedI use version jQuery Update 6.x-2.x which updates Drupal to jQuery 1.3.x (currently 1.3.2)...
(I would need it for the Gallery Assist Lightboxes module - some of the integrated Lightboxes, like Colorbox or preetyPhoto need jQuery 1.3)
Thanks a lot and greetings, Filburt
Comment #3
phayes commentedThere is likely more than one place where jQuery 1.3 breaks, one place is at file_form.js line 7
It was
$('input[@type=file]').change(function() {It should be
$('input[type=file]').change(function() {Just remove the @. This should be done regardless of your jquery version ( The @ is depreciated as of 1.2, but was removed in 1.3)
Comment #4
miglius commentedDoes this change fixes the issue above?
Comment #5
mrangryfish commentedI just had this problem and found the solution the hard way. And was about to report this fix but found it was already logged here. So this is more google-able here is the error you get if you dont remove the @ symbol:
this is the error in the browser - uncaught exception: Syntax error, unrecognized expression: [@type=file]
This came up for me when I was trying to use 'hierarchical select content taxonomy' and was getting a "You don't have Javascript enabled" error message from it. The problem i suppose was instead that this error prevented more js from continuing.
Is there harm in pushing this fix into the next release? Might save some people an hour or so of hunting around.
Comment #6
brianV commentedPatch attached to remove the deprecated '@' sign. Just to clarify, this symbol is deprecated in the version of jQuery (1.2.6) that ships with D6, and is removed in jQuery 1.3.2, which ships with jQuery Update 6.x-2.x.
Note that this doesn't make everything work, just removes a single incompatible element.
Comment #7
Equinger commentedI just want to confirm that file previews on the page do not display with the jquery update mentioned above even with this patch.
Comment #8
brianV commentedYep, the above patch was intended as a starting point, not a complete solution.
Comment #9
Equinger commentedThanks, Brian. I think this might be the other problem. The file preview, from what I understand, relies on the Drupal AHAH call as seen in file.inc:
function file_render_preview_for($file, $handler, $id) {
$form['preview'] = array(
'#type' => 'button',
'#id' => $handler .'-'. $id,
'#ahah' => array(
'path' => 'file_preview/'. $handler .'/'. file_get_hash($file->uri) .'/'. $file->vid,
'wrapper' => 'file-preview-container-'. $id,
'method' => 'replace',
'effect' => 'slide',
),
);
form_expand_ahah($form['preview']);
return $form;
}
I think the Jquery update module needs to be fixed or we need a workaround here:
http://drupal.org/node/796538#comment-3784102
Unfortunately I need this version of Jquery update.
Comment #10
Equinger commentedAny new thoughts here. I'm still having problems viewing previews. I am pretty certain that it is related to this jquery update.
Comment #11
jvieille commentedPreviews nor node title population by the selected file name work with Jquety Update module enabled
Comment #12
jvieille commented6 solves the node title population by the selected file name issue, but not preview
I tried
http://drupal.org/node/806500#comment-4004316
and
http://drupal.org/node/806500#comment-3744998
but it did not help
One and a half year issue - any hope for a solution?
Comment #13
jvieille commented+1
Comment #14
jvieille commentedHas anyone found a solution?
Something here, but this did not help in my case
http://drupal.org/node/806500#comment-5076470
Comment #15
johanneshahn commentedtry using jquery_update 6.x-1.1
this is more an jquery_update problem.
Comment #16
jvieille commentedNo, it is a FF compatibility issue with latest versions of JQuery
It is major issue, one of my biggest concerns as it breaks the magic of auto loading previews
Comment #17
jvieille commentedThe JQuery changes for 1.3 version are here
http://docs.jquery.com/Release:jQuery_1.3
Something to look at:
For autoload previews:
in file.theme.inc
changes where made to .trigger()
http://api.jquery.com/trigger/
that might affect this construct.
Actually, the
in file_attach.theme.inc
function theme_file_attachments($files, $pid)
Probably the js code generated might need some tweeks to get through latest jscript?
Comment #18
johanneshahn commenteddear jvieille,
ur right with the change of trigger handler in jq 1.3
this will solve the problem of first loaded handler.
but the main problem is that with jquery_update the preview ajax requests
didnt work at all.
the issue on jquery_update does not fix it for fileframework.
http://drupal.org/node/806500
i would rewrite the complete preview think with a small own solution ($.ajax()....).
we had similar problems with third party modules like bitcache etc.
my plan is to remove much as possible of this dependencies.
what u think?
Comment #19
jvieille commentedSome firebug debugging of the file node preview
This is the code that is generated by the theme_file_previews function
it is followed by
With JQuery 1.2.6, the html output is:
With JQuery 1.3.2, it becomes
<div id="file-preview-container-0"></div>I can't do much more investigating this issue.
Help would be much appreciated: Previews are one of the smartest features of FF it really need to work with JQuery 1.3+ that is necessary for many modules.
Comment #20
johanneshahn commentedtry out latest dev version.
Comment #21
jvieille commentedThe latest dev does not help.
Have you changed something that might let you think the issue is solved?
Why this quote "please wait foor latest nightbuild 2011-Feb-26"
Thanks for looking at this issue.
Comment #22
johanneshahn commentedhi jvieille,
u can checkout the latest dev version via git
git clone --branch master johanneshahn@git.drupal.org:project/fileframework.giton drupal.org u can download the new version if drupal updates the commits from git.
this happens mostly at midnight. then a downloadable tar/zip is created.
so if u need the latest dev please update fileframework via git or wait until
2011-Feb-262011-Dec-06
my fault:
i think its better to close fixes if module tar is generated by drupal.
Comment #23
jvieille commentedNot sure I get it.
- There is a new dev on the project page, dated of today
- "2011-Feb-26" Are you sure? this is almost last year...
I am not yet comfortable with git...
Comment #24
johanneshahn commentedcopy paste error
mean 2011-Dec-06
Comment #25
jvieille commentedToday's dev is the good one...
THANK YOU SO MUCH!!!!!!