I was seeing errors that my destination directory could not be created. There's a problem in MigrateFile::processFile(). file_prepare_directory() expects the $directory arg to be passed by reference, which you can't do when passing the return value of a function. The fix is to the separate drupal_dirname() call from the file_prepare_directory() call. Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dnmurray’s picture

FileSize
4.76 KB

Maybe I should test these things. New patch, that doesn't trash destination filename.

dnmurray’s picture

FileSize
856 bytes

OK, now I just want to delete this and start over... At any rate, I think I got the right patch file attached this time.

13rac1’s picture

Status: Active » Needs review

Setting to Needs Review to run tests.

13rac1’s picture

Implementation looks sound. Patch doesn't apply.

Status: Needs review » Needs work

The last submitted patch, 2: migrate.file-mkdir.patch, failed testing.

  • Commit 2844fa8 on 7.x-2.x authored by dnmurray, committed by mikeryan:
    Issue #2210533 by dnmurray: Properly pass directory by reference
    
mikeryan’s picture

Status: Needs work » Fixed

Committed, thanks!

@dnmurray: For future reference, generate contrib module patches from the module's directory, not docroot.

mikeryan’s picture

Issue tags: +Migrate 2.6

Tagging as 2.6.

Status: Fixed » Closed (fixed)

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

dnmurray’s picture

@mikeryan Thanks. I should have taken care of that. I need to stop by more often.