Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Files listed as missing after move
We moved from one host to another but from some reason, the files tab lists all uploaded files as ‘missing’, yet the files folder moved over correctly.
As TXP sees the files as missing, /file_download/349/FOO.pdf gets a 404, even though one can directly link to it.
I have moved TXP installations a dozen times and never seen this before.
Anyone have a clue what I did? (TXP 4.5.7)
Last edited by amordecosmos (2014-11-11 09:38:05)
Offline
Re: Files listed as missing after move
Txp uses the database to determine if a file is ‘missing’ or not. So under the following circumstances, Txp may return a 404:
- If your
txp_file
table in the database is different / empty / corrupt, some or all files will be affected, depending on the severity of the mismatch. - If the IDs and filenames in the database don’t match the filenames in the
/files
folder. e.g. if ID 349 is set as linking toFoo.pdf
in the database, but the URL is actually a different value or links toBar.pdf
. This is unlikely to happen unless thetxp_file
table has been reconstructed somehow and new IDs have been generated, or you have used ‘static’ IDs in your Pages/Forms. - If the status of the file is not Live.
- If your Advanced pref File directory path is pointing to the wrong place. All files will be affected.
What does your Content->Files panel indicate? Any clues in there?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Files listed as missing after move
Bloke, thank you for responding.
1) txp_file is uncorrupted and everything matches. IDs and names.
2) File status in DB is live.
3) Adv Pref file director path is correct.
4) Content > Files panel says ‘Missing’
Two files have been added since I moved it, they both work correctly and have the proper ID numbers.
Last edited by amordecosmos (2014-11-11 11:12:48)
Offline
Re: Files listed as missing after move
Hmmm, how about the file permissions of the files copied over? If new ones are going in OK, it may be that the originals aren’t readable by the system and Txp falls over. They may have the ‘owner’ of the FTP process that was used to upload the files, not the owner of the process that runs the web server so you might need to alter ownership or widen permissions to be able to access them. Compare the two new files and see if that helps.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Files listed as missing after move
Well – that found my solution, thank you Bloke.
Of course, it proves that the problem was me.
1) Adv Pref Files link was wrong: it went to root, not root/files
2) Therefore new files were being upload to root.
D’oh.
Offline