Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm working with a client that has a jQuery version dependency (1.7.1 or higher is required), which is easily handled by the jquery update module. However, once that is complete, the "File Browser" functionality no longer works. IMCE editor opens, I select the file, and submit... but it never attaches and I'm left with a select field again.
I know that this is not a bug because it works fine with jQuery 1.5 and below, hence I'm labeling it a feature request.
I'm comfortable with digging in to fix this, but any pointers where to start would be awesome. I'm also available in IRC.
Comment | File | Size | Author |
---|---|---|---|
#18 | file_path_as_textfield-1882466-18.patch | 1.19 KB | md2 |
#11 | filefield_sources_imce_jquery_update-1882466.patch | 653 bytes | quicksketch |
#6 | 1882466-filefield-sources-jq18.patch | 722 bytes | fearlsgroove |
Comments
Comment #1
laur3ntlapo CreditAttribution: laur3ntlapo commentedI have the same issue. Im using jQuery update -> 1.7, and i can't insert image using the IMCE File browser.
Comment #2
pyQlo CreditAttribution: pyQlo commentedSame issue here with jquery update 1.7.
I've also no idea where to start for a workaround - Firebug throws no errors.
Comment #3
eusonic CreditAttribution: eusonic commentedCheck out #1524944: Allow different version for administrative pages, comment 33. There is a patch for jQuery Update that allows you to use different versions for admin and front-end themes. This patch fixes this issue perfectly.
-Cameron
Comment #4
eXoSaX CreditAttribution: eXoSaX commentedI have the sam issue. I am using the latest IMCE module with latest File Sources module.
This is what happens when I Insert a file from IMCE:
JavaScript error doesn't happen and in Drupal log there is also no error. I am using jQuery 1.7 with jQuery Update. When I switch to 1.5, it works fine. I am also using ImageField Focus module and I tried without it, but the issue persists.
I don't like the solution in #3. Is that the only one that can fix this issue?
Comment #5
blackandcode CreditAttribution: blackandcode commentedI have the same bug as eXoSaX.
Does anyone have similar problems???
This is good option and good module but without this it is useless...
IS THERE ANY SOLUTION?
Comment #6
fearlsgroove CreditAttribution: fearlsgroove commentedThis is the result of using jquery > 1.6 (via jquery update). The attached (fugly) patch seems to work with both jquery 1.5 and 1.8, and should also work without any jquery update installed. I have not test that last scenario.
Comment #7
fearlsgroove CreditAttribution: fearlsgroove commentedoops NR
Comment #8
rojesaga CreditAttribution: rojesaga commentedoops? hehehe, I apply the patch and nothing happen.
Comment #9
krima CreditAttribution: krima commentedThe patch at # 6 works thanks (tried with jquery 1.8)
Comment #10
quicksketchThanks for narrowing down this problem @fearlsgroove!
A much easier way of handling this problem is simply using
$(this).removeAttr('disabled')
. $.removeAttr has existed since jQuery 1.0 and works consistently across all versions.Comment #11
quicksketchTested and committed the attached patch. Thanks guys!
Comment #12
siramsay CreditAttribution: siramsay commentedI having exactly same issue with drupal 6.25 & 6.28 upgrade from 6.x - 1.4 to 6.x- 1.8
I have not updated jquery core at all.
EDIT*
downgraded on 6.25 & 6.28 install to 6.x - 1.7 and problem has gone
Comment #13
quicksketchHi @size, in which browser were you experiencing this problem?
Comment #14
siramsay CreditAttribution: siramsay commentedhi @quicksketch
FF20
I will test on a install I have jquery update (1.3.2) running on today and report back. but from what you say this shouldn't be the problem.
arigatou!
Comment #15
siramsay CreditAttribution: siramsay commentedComment #17
danmed CreditAttribution: danmed commentedHello,
sorry to re-open this thread but I am having the same problem, and the patch proposed in #11 cannot be applied (source code does not match my version).
FileField Sources version: 6.x-1.8
Jquery UI version: 1.7.3
This happens with FF (20.0.1), Chrome, IE9... under Win. 7
For your information, the code I have in imce.inc is:
Note: my filefield can have multiple values. After selecting a file in IMCE, my selection does not show up. But if I hit "Add another", then my previous selection does show (that's a workaround, but hard to explain that to back office users...).
Maybe this is exactly this situation: #2004922: IMCE Not kicking start onblur event when using OS X browser.
and the issue is not limited to OS X browsers.
Thanks for your help.
Comment #18
md2 CreditAttribution: md2 commentedThe following patch brings the current 6.x-1.8 and 6.x-1.x-dev branches back inline with the fix from #11. I also noticed that the $element['filefield_imce']['file_path'] array defines a textfield but the rendered HTML was still showing a hidden field. The patch also contains a change to theme_filefield_source_imce_element($element) to output the HTML as a textfield and not a hidden field. If this is wrong I apologise and can re-roll the patch, but it seemed to make sense to me.
I've tested across Chrome,FF,Safari,IE7-9 and all seem to work fine.
Cheers,
Mark
Comment #19
Sarah_G CreditAttribution: Sarah_G commentedI reverted filefield_sources back to version 6.x-1.7 and my IMCE inserts as expected.
Hoping the fix gets included in the next version.
Comment #20
j-conk CreditAttribution: j-conk commentedThe file browser is still not working for me. The file browser works with 6.x-1.7, but not with 6.x-1.8, 6.x-1.9 and 6.x-1-10.
Comment #21
osopolarIMHO it's just a Problem with the backport in issue #1334378: Insert file on IMCE fails in some Browsers.