Uploaded Files Changes Their Name to Other Character Drupal
IT works fine to upload files with ampersand in the file proper name to a node with a unmarried image field, but if there are multiple image fields on the node the file uploads and is stored properly, but doesn't brandish in preview or on the node and it throws the error "Discover : Undefined index: display_field in file_field_widget_value() (line 595 of /home/jglynn/public_html/canmorehousing.ca/modules/file/file.field.inc )." when saving the node.
Support from Acquia helps fund testing for Drupal
Source: https://www.drupal.org/project/drupal/issues/1346600
Comments
Annotate #i
Anonymous (not verified) Credit Attribution: Bearding commented
squeamish problems. i can get this to neglect with just a unmarried image with '&' in the filename. will play with another characters.
past the time nosotros get to image_style_deliver(), the menu system has messed with the args such that everything afterwards the '&' is gone, so nosotros get all sorts of brokenness from that betoken on.
Comment #2
Bearding (not verified) Credit Attribution: Anonymous commented
Annotate #3
Bearding (not verified) Credit Attribution: Anonymous commented
Comment #4
Anonymous (not verified) Credit Attribution: Bearding commented
given a path like "sites/default/files/styles/large/public/field/image/hope%26.png", with clean urls enabled, past the fourth dimension this hits php, apache has decoded '%26' to '&', and $_GET['q'] looks like this:
"sites/default/files/styles/large/public/field/epitome/hope"
and we take another $_GET key, '_png'.
which is what is causing this awesome. sooooo, we prolly need to disallow '&', or encode it differently, or something.
Annotate #five
webchick
English language
Vancouver 🇨🇦
Credit Attribution: webchick commented
Looks like a legit problems, but I'yard not sure that it's a big plenty deal to cake D8 features. There's no data loss occurring.
Weird, I've tried to reproduce this (single and multiple images), but tin can't.
Comment #8
Cottser
English
Credit Attribution: Cottser commented
@swentel - I wasn't able to reproduce, just I only tested a single image in a single image field (based on the study from the closed issue mentioned in #half-dozen).
Comment #9
webchick
English
Vancouver 🇨🇦
Credit Attribution: webchick commented
Sounds like we need more info. It's possible this is an environs issue?
I had a take chances to test again, wasn't able to reproduce.
This is all on the article content blazon on a fresh install of 7.12.
And several combinations of the in a higher place. More info indeed.
Annotate #11
Anonymous (not verified) Credit Attribution: Anonymous commented
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch wtf-lol-d7.patch. Unable to use patch. See the log in the details link for more than information. View
PASSED: [[SimpleTest]]: [MySQL] 34,084 pass(es). View
no. no. no. this is hands reproducible.
checkout this patch for drupal 7 and drupal 8, and the attached screenshots.
so, they should pass. for lolz, see how this is cleaved, just all green.
Using D7.14:
I take a site that pull images in via feeds imagegrabber and information technology had pulled in an image with an ampersand in the file name, which on the staging server (Ubuntu, Apache ii, PHP 5.2) seemed to work fine.
When I pushed it up to the alive server today (Windows, IIS vii, PHP 5.ii) and prototype way images for the file weren't being generated as it was trying to hit an image style path that stopped where the ampersand was in the original file name.
- I can't access the site from where I am now so i can't give the exact watchdog messages.
Reseting version issues are fixed in head first.
I have a trouble with ampersand in the image proper noun and derivative cosmos via image styles.
Image is uploaded fine, merely unable to create image style.
Here's the filename:
Here's the prototype style path from the browser
Get this mistake
Closing every bit outdated. Please re-open if this is still relevant.
Annotate #24
minnur Credit Attribution: minnur as a volunteer commented
This is still happening in the latest D8 and D9. The site is on Pantheon.