PROBLEM:
Currently (7.x-1.x-dev on 2011-11-22), devel generate fails with PDO exception for entities containing a filefield which path is not yet created (e.g. you haven't yet manually created an entity with a content for the respective filefield). Devel.modules imagefield generation plugin in contrast handles this correctly.
SCENARIOS:
This bug prevents devel generate from working (sometimes _at all_), when:
* trying to generate test content having filefields on a newly installed site (after "drush si")
* trying to generate test content having newly added filefields with (new) path set
* trying to generate test content having filefields with changed (path) settings
* in other scenarios, see http://drupal.org/node/924228
SOLUTION:
Devel generate has to create paths for filefields like the imagefield content generation plugin does it: By using "file_prepare_directory" and "FILE_CREATE_DIRECTORY".
Patch will follow soon.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1349288_devel-filefield-directory-handling.patch | 1.78 KB | danielnolde |
Comments
Comment #1
danielnolde CreditAttribution: danielnolde commentedThe attached path should fix this problem for devel.module 7.x-1.x-dev (2011-11-22), by introducing proper directory preparation/creation in _file_devel_generate();
Please REVIEW and hopefully COMMIT ;)
Comment #2
rfayComment #4
moshe weitzman CreditAttribution: moshe weitzman commentedcommitted to 7.x and 8.x.
please do diffs from the root of the project (i.e. the /devel dir).