What are the steps required to reproduce the bug?

With the latest RC of Drupal and the latest -dev of devel module, devel generate some content that has an image field.

What behavior were you expecting?

Expected to see files put into folders with default file field path tokens substituted, i.e. public://2015-10/hvr9u.gif

What happened instead?

Tokens are not substituted, and so paths are literally public://[date:custom:Y]=[date:custom:m]/hvr9u.gif instead.

The crux of the issue is that ImageItem\generateSampleValue doesn't do any token substitution. Tests likely don't fail because it still does generate a file at a path where it can be expected to be retrieved later. This may reveal a lack of test coverage for the token substitution.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cwells created an issue. See original summary.

chrisfromredfin’s picture

Status: Active » Needs review
FileSize
1.05 KB

Here's my first attempt - no clue if this is the right approach or not. Please let me know!

Status: Needs review » Needs work

The last submitted patch, 2: new_default_tokens_for-2610402-2.patch, failed testing.

chrisfromredfin’s picture

Status: Needs work » Closed (works as designed)

Nevermind - while trying to re-roll for HEAD I can confirm this was fixed in head / after RC3.