Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
#2128055: Files should be uploaded to per year/month directories by default changed the default file upload location to include YYYY-MM in the file upload location. However ImageItem::generateSampleValue()
was not updated to use the new system resulting in un-replaced tokens in the directory path. This causes, for example, devel_generate
to throw an exception when generating content that includes images.
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen Shot 2015-11-04 at 5.12.27 PM.png | 298.56 KB | zaurav |
#6 | Screen Shot 2015-11-04 at 12.38.41 PM.png | 85.03 KB | zaurav |
#2 | 2604602-2.patch | 942 bytes | mikeker |
Comments
Comment #2
mikeker CreditAttribution: mikeker as a volunteer commentedLooks like this only throws exceptions on Windows -- the colon character in reserved on Windows, allowed in *nix, and the token used is
[date:custom:Y]-[date:custom:m]
.Regardless it will still generate incorrect paths on *nix.
Comment #3
anavarreTried to generate content with devel_generate. Confirmed the faulty path to images:
Applied the patch cleanly, tried again to generate some content. Directory structure is now correct:
Comment #4
effulgentsia CreditAttribution: effulgentsia at Acquia commentedThis is fixing a bug that got introduced during RC, so I think is appropriate to fix during RC as well. Tagging for triage to get input from another committer.
Comment #5
effulgentsia CreditAttribution: effulgentsia at Acquia commented@xjm agrees, so tagging.
Comment #6
zauravTested in a Linux environment. Initially, when generating content (drush genc 50) watchdog logs show an error https://www.drupal.org/files/issues/Screen%20Shot%202015-11-04%20at%2012...
Image is still uploaded.
But after applying patch, error is resolved.
Tried to replicate on Windows VM got the following error (without applying patch). https://www.drupal.org/files/issues/Screen%20Shot%202015-11-04%20at%205....
Application of path was not successfull (using Acquia Dev Desktop Drupal 8.0.0-beta15)
Comment #7
DuaelFrI did a round of manual testing and I can confirm that this patch fixes the issue.
Comment #9
effulgentsia CreditAttribution: effulgentsia at Acquia commentedThanks! Pushed to 8.0.x. @zaurav: your Windows screenshot looks like a different error to me, but might be a nice find. If you can consistently reproduce it, please open a new issue for it.
Comment #10
effulgentsia CreditAttribution: effulgentsia at Acquia commentedActually, that might be the problem, since beta15 is quite old now. Are you able to reproduce it with either the branch tip of 8.0.x, or with RC3 + the #2 patch applied?