Moved Data folder now old download links don't work

I had need to move my Elgg install from a subdirectory into the root. I placed the data folder above root, cleared out the data cache and updated the references in the db to the url, root and data (ensuring I included trailing slash). The problem is that I use elgg as a file repository and any files uploaded prior to move do not download properly (pdf's appear to download instantly but are when you open them they are corrupt), yet files uploaded since the move download ok fine. Initially I thought the new files were referenced differently in the db after the move but the records relating to old and new records look identical. In the off chance that files corrupted during the move I downloaded an old pdf via ftp and it opened fine. I don't want to have to re-upload the 150 pdf's one at a time so any help would be gratefully appreciated.

  • Can anyone help me by explain how files are referenced in the DB and what table is reponsible?

  • mucho problemo ;-) u fixed the datalists data root ? but elgg Objects still point to older data folder. sooooo you see "broken" file object  @ download time.

  • When I move a site, I export the database and then do sed search and replace's on the dump file before importing it. I've never had a problem and have done it a few times. I think it is more robust than the instructions on the wiki site.

    To your specific problem, you should be able to do a search through your database for entries related to your old data path. I think there are just 2 entries that need to be changed, the dataroot in the datalists table and in the metastrings/metadata tables, look for filestore::dir_root

  • @Cash, thanks a lot - easy when you know how.