Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-18 19:58:41

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

Tags generating wrong file downloading (4.0.4)

I have no idea if this is a 4.0.4-specific problem.

I have two files available for download at http://www.andcuriouser.com/current/video/. When you try to download the top file, the download is correct. When you try to download the bottom file, however, the wrong file is downloaded.

This is the link to the second file:

<code>
<txp:file_download_link id=“4”>*Watch Tips for Modern Living*</txp:file_download_link> (4.4mb)
</code>

… but you’ll see in the source that the tag is generating a link to file #1. Am I doing something wrong?

Thanks,
Aaron

Last edited by ashground (2006-10-19 20:06:26)

Offline

#2 2006-10-19 19:36:31

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Tags generating wrong file downloading (4.0.4)

Can you please post the relevant parts of the page/form(s), and their respective output. Thank you.

Offline

#3 2006-10-19 20:09:06

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

Re: Tags generating wrong file downloading (4.0.4)

<code><txp:file_download_link id=“4”>*Watch Tips for Modern Living*</txp:file_download_link> (4.4mb)</code>

… (posted in an article) is generating …

<code><p><a href=“http://www.andcuriouser.com/current/file_download/1”><strong>Watch Tips for Modern Living</strong></a> (4.4mb)</p></code>

I can’t think of any other code that would be relevant.

Offline

#4 2006-10-19 20:39:20

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Tags generating wrong file downloading (4.0.4)

And the link to the first? Are there any in between? Is there any in your article form?

Offline

#5 2006-10-19 21:06:55

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Tags generating wrong file downloading (4.0.4)

Confirmed bug. I can reproduce it by placing two different <txp:file_download_link id="n"> or <txp:file_download_link filename="foo"> tags on a page.


Alex

Offline

#6 2006-10-20 11:44:35

wordgasm
Member
Registered: 2006-05-17
Posts: 83
Website

Re: Tags generating wrong file downloading (4.0.4)

I have the same problem. I have about 40 download links in this page but all of them seem to have the link and description of the very first download file. I tried using different tags both from 4.0.3 and 4.0.4 but none of them worked. :(

Offline

#7 2006-10-22 13:34:55

adfernandes
New Member
Registered: 2006-10-22
Posts: 3

Re: Tags generating wrong file downloading (4.0.4)

I have the same problem described here. The problem appears only with the <txp:file_download_link id=“n”> or <txp:file_download_link filename=“foo”> syntax.

Does downgrading to 4.0.3 work?

Offline

#8 2006-10-22 14:00:29

adfernandes
New Member
Registered: 2006-10-22
Posts: 3

Re: Tags generating wrong file downloading (4.0.4)

I turned on site debugging as in the FAQ, and found that the first txp:file_download_link tag generates an SQL query, but NO subsequent txp:file_download_link tag generates an SQL query.

As a quick hack, I edited textpattern/publish/taghandlers.php, searching for file_download_link (line 2947, in function file_download_link($atts, $thing)). It is a line that says if (empty($thisfile)). Just comment out the line by changing it to read // if (empty($thisfile)). That seems to fix things. (The formatting of the page is a bit off, though, and I don’t know why…)

This should make people’s sites usable until a real fix comes through…

Offline

#9 2006-10-23 02:32:30

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Tags generating wrong file downloading (4.0.4)

FAQ

Offline

#10 2006-10-23 02:52:40

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Tags generating wrong file downloading (4.0.4)

Mary, is there likely to be a new txp download offered soon that incorporates this bugfix?

Offline

#11 2006-10-23 14:58:28

adfernandes
New Member
Registered: 2006-10-22
Posts: 3

Re: Tags generating wrong file downloading (4.0.4)

Yep – the fix works fine for me!

Thanks!

Offline

Board footer

Powered by FluxBB