Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-13 17:12:33

anthonybooth
Member
From: UK
Registered: 2007-01-13
Posts: 21
Website

file_download problem

I built a site in a proof directory while their old site remained live.
Everything worked fine. I used Mary’s upm_file for multiple files to articles with no problem.
I have just made the site live and run Diagnostics no problem.

Everything but the downloadable files work?

I get a message The page you requested, file_download/4/MembershipApplicationForm2007.pdf, was not found.

I have checked permissions paths in the prefs but can’t see anything wrong. If I take the file name off (file_download/4/) it finds it though it asks what you want to do save or open which is normal.
If I navigate direct using the files/MembershipApplicationForm2007.pdf no problem.

Help!!!!!! please

Ignore it was a stupid nasty evil plugin.

Last edited by anthonybooth (2007-11-13 20:12:50)


Forever learning.

Offline

#2 2008-02-12 10:58:55

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: file_download problem

Care to tell which plugin..? I get the same error.

Offline

#3 2008-02-13 19:34:49

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: file_download problem

Anton wrote:

Care to tell which plugin..? I get the same error.

Just learned that one of my file_download links wasn’t working either. Not sure when this broke, as it was certainly working before.

On the Content->Files page I was getting an undefined index error referring to txp_file.php line 240. Line 240 gets the value of the status field for the file. I then checked and found that the file in question had a status value of 0, whereas on my local version of the same website the status for that file is 4. I changed the value (directly in the db) and now the download link works again.

I’d be grateful to be enlightened as to what is going on here, especially what the status codes for Content->Files mean, and how a file’s code might get set to 0.

[Edit] OK, so status of 4 means “live”. Still don’t know how this got set to 0.

Last edited by jsoo (2008-02-13 19:37:48)


Code is topiary

Offline

#4 2008-02-13 19:42:06

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: file_download problem

i’ve had wonky file downloads as well. i had to reupload some files in order for them to work again. otherwise, download links just lead to a blank page. no idea!

Offline

#5 2008-02-13 21:23:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: file_download problem

Not sure if it’s related, but under TXP 4.0.5 there was a small bugette whereby if you renamed a file “outside” TXP (e.g. in your FTP client) or it somehow lost the link such that the file was reported “missing” on the Files tab, when you relinked the file with its correct download, the status was lost (set to 0). The result was an error displayed in the Files tab page.

I got round it by clicking the file again to edit it (none of the status radio buttons were selected) then choosing ‘live’ and re-saving the file to make TXP happy again.

wet fixed this a while ago so it shouldn’t be happening any more. If something like this is still happening in 4.0.6 I’d like to find out under what circumstances because it might impact my remote_file plugin. Hopefully the “stupid nasty evil plugin” mentioned in the OP wasn’t mine :-D

Last edited by Bloke (2008-02-13 21:24:51)


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

#6 2008-02-13 22:18:09

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: file_download problem

Bloke wrote:

under TXP 4.0.5 there was a small bugette whereby if you renamed a file “outside” TXP (e.g. in your FTP client) or it somehow lost the link such that the file was reported “missing” on the Files tab, when you relinked the file with its correct download, the status was lost (set to 0). The result was an error displayed in the Files tab page.

That’s probably what happened in my case. Glad to hear it’s been fixed.


Code is topiary

Offline

Board footer

Powered by FluxBB