Can anyone advice on how I can mass update document urls in node body content?
I am in the process of migrating a just over a thousand pages into Drupal using the migrate module.
The pages are successfully migrating but they also have PDF documents uploaded into the body field of a lot of the nodes. Those pdf links are now broken because the pdf documents are uploaded into a migration/intranet/files/ directory as opposed to files.
Using this example, I tried the following directly approach to update a sample body field:
UPDATE field_data_body SET body_value = REPLACE( body_value, '<a href=\"', '<a href=\"/migration/intranet/files/') where entity_id=20916;
My update works but I get the following path as a result:
http://*.*.*.*/intranet/migration/intranet/files/migration/intranet/files//migration/intranet/files///migration/intranet/files/migration/intranet/files/intranet/migration/intranet/filess1_2015_-_iworld_release_6.12.pdf
Instead of: http://*.*.*.*/intranet/migration/intranet/files/s1_2015_-_iworld_release_6.12.pdf