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.
hello everyone. i've been having an issue where i cannot add a file to a node via imce browser. I create new content, click File Browser, Browse, select my file, click insert and the progress bar appears for a split second and disappears leaving me back as if i'm about to add a file again.
I have created a brand new Drupal 7.29 insatllation on my localhost and installed IMCE and FileField Source. This issue still happens. All the file permissions look right. Drupal permissions look right. IMCE profiles are correct.
Any help at all would be greatly appreciated! Thanks!
Comment | File | Size | Author |
---|---|---|---|
#5 | filefield_sources_broken-2307813-5.patch | 764 bytes | fabianvdbor |
Comments
Comment #1
ias_nickhelm CreditAttribution: ias_nickhelm commentedSome further troubleshooting led me to downgrade Drupal Core to 7.28. Once core was downgraded, FileField Sources started working correctly again. Unfortunately i'm unfamiliar with the File module code in core and FileField Sources so it may take me a while to figure out a fix, however, here's the link to the patch notes for Drupal 7.29. https://www.drupal.org/drupal-7.29-release-notes
Comment #2
ste.pb93 CreditAttribution: ste.pb93 commentedI'm also experiencing this issue (which also applies to IMCE for FileField) and have replicated the issue on a fresh drupal 7.29 install.
Comment #3
ias_nickhelm CreditAttribution: ias_nickhelm commentedThis issue seems to be fixed with the release of Drupal Core 7.30
Comment #4
skilip CreditAttribution: skilip commentedStill seems to be broken in 7.31.
Comment #5
fabianvdbor CreditAttribution: fabianvdbor commentedI provided a patch that fixes this bug. It checks in hook_file_download if url is external and access to the file with drupal_http_request(). After the check it returns the header information from drupal_http_request() back to the function file_download_headers().
Comment #6
Dean Clayton CreditAttribution: Dean Clayton commentednot sure if related, but using the imce file browser, on selecting a file , Chrome crashes ( with the dark blue "oh snap" page)
I don't have this issue in firefox, but the thumbnail is broken.
I tried adding the patch above, but it didn't make any difference.
I'm running 7.31 and i'm on PHP 5.4.3
Comment #7
LonitaD CreditAttribution: LonitaD commentedChrome was crashing for me too in 7.31. The patch in #5 fixed the issue.
Comment #8
batigol CreditAttribution: batigol commentedI can confirm the issue.
Comment #9
decibel.places CreditAttribution: decibel.places commentedWhile debugging the problem in Drupal 7.31 (I did not try 7.32) prior to discovering this issue and rolling back core to 7.28, I found that the fid is not passed to filefield_sources.module in the $form_state.
The patch in #5 did not help, in fact caused an error message. Perhaps because I am storing image files in Amazon S3 and that required a small patch to rewrite the file uri with the s3:// scheme to match the uri in the file_managed table so that the file validated in imce.inc #2359797: filefield_sources imce correct uri to return a valid fid from file_managed table for images hosted on Amazon s3
Adding the correct fid for the specific file enabled the display of the image when the IMCE browser is dismissed after selecting an image.
I was unable to discover why it was not added to $form_state.
I suspect that changes in the core image module may be causing the problem, because it is called when the file is an image for certain validation functions; it may not be passing the fid back to Filefield Sources.
Therefore we may need to add the fid before the function filefield_sources_field_submit function.
See the last 3 lines below:
Comment #10
profak CreditAttribution: profak as a volunteer commentedIssue solved here #2466247. Closing.