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.

Files: 
CommentFileSizeAuthor
#1 1349288_devel-filefield-directory-handling.patch1.78 KBdanielnolde
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1349288_devel-filefield-directory-handling.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

Comments

StatusFileSize
new1.78 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1349288_devel-filefield-directory-handling.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

The 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 ;)

Status:Active» Needs review

Status:Needs review» Needs work

The last submitted patch, 1349288_devel-filefield-directory-handling.patch, failed testing.

Status:Needs work» Fixed

committed to 7.x and 8.x.

please do diffs from the root of the project (i.e. the /devel dir).

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.