When importing files using the Migrate module, if Media Browser Plus is enabled, the destination always defaults to the public files directory, regardless of what's set as the destination directory in Migrate. This happens in media_browser_plus_file_presave. If Media Browser Plus finds no value for the field_folder tid, it just defaults to the root folder.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anemirovsky created an issue. See original summary.

anemirovsky’s picture

Status: Active » Needs review
FileSize
1.49 KB

Migrate conveniently adds some metadata to the entity, so I've adjusted the presave function to check if that metadata is present and to not alter the uri if that's the case.

das-peter’s picture

Status: Needs review » Fixed

Thanks for the patch, looks good to me :)

  • das-peter committed 0025c8e on 7.x-3.x authored by anemirovsky
    Issue #2553559 by anemirovsky: Don'\''t force the root file uri if files...

Status: Fixed » Closed (fixed)

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