Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
when I develop on my home box (ocdevel.local) & push to production (ocdevel.com), none of the file fields carry over. The actual files carry over (sites/default/files/*), but the field in node view or edit just act like I never uploaded a file.
Comments
Comment #1
jmlavarenne CreditAttribution: jmlavarenne commentedYou uploaded the database tables also right? Sorry if this is obvious.
Comment #2
lefnire CreditAttribution: lefnire commentedyes, and the {files} table has sites/ocdevel.local/files/images/x.jpg for the files instead of /sites/ocdevel.com/files/images/x.jpg
ps, in the first comment i said my files are at sites/default/files/, the are at sites/ocdevel.local/files/* which I change to sites/ocdevel.com/files/* on migrate, just realized that might make a big difference?
Comment #3
jmlavarenne CreditAttribution: jmlavarenne commentedYes it could. If you did not update the information in your database, I suppose Drupal will still be looking for the files at ocdevel.local.
Comment #4
lefnire CreditAttribution: lefnire commentedimagefield in d5 took care of this automatically, but i think that was because files were at /files, rather than /site/x/files. in fact, now that i think about it there's probly no easy way for the module itself to take care of this, is there? if not, feel free to close this issue. for those in the future that hit this problem, I guess mysql find/replace is the best way to go about it
Comment #5
dopry CreditAttribution: dopry commentedyeppers know issue with core file handling adding the file_directory_path to the filepath.. You can either create a symlink on your production environment or update the paths in the DB. I suggest you update the paths in the DB and use matching paths in both prod and dev for file directory path.