Because of str_replace() usage in content_migrate_filefield_data_record_alter() all occurrences of file directory path will be removed from the file path and not the only one at the beginning.

For example, when file directory path is just "files" and file path is "files/profiles/my-files/img1.png" the URI becomes "public://pro/my-/img1.png", which is really wrong and we expect "public://profiles/my-files/img1.png".

Patch follows.

CommentFileSizeAuthor
#4 cck-1732944-04.patch797 bytesrfay
#1 cck-1732944-1.patch1.27 KBDmitriy.trt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dmitriy.trt’s picture

Status: Active » Needs review
FileSize
1.27 KB
DamienMcKenna’s picture

Issue summary: View changes
Parent issue: » #1277262: Plan for CCK 7.x-3.0 release
DamienMcKenna’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
rfay’s picture

FileSize
797 bytes

The patch in #1 looks right to me, but it doesn't currently apply, as it has the wrong filename (filefield.inc instead of file.inc). Here's a simple reroll, no changes.