Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
tag builder error or change of functionality?
I just uploaded a pdf on our site and as I felt lazy, I clicked on the tag builder to get the code needed to link to the file. What I got was
"compressed.pdf":/File download/xx/compressed.pdf
shouldn’t that be
"compressed.pdf":/File+download/xx/compressed.pdf
?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: tag builder error or change of functionality?
Hi Oleg,
Just to say that the bug is not just in textile but also in the html which returns
<a href="/File download/xx/compressed.pdf">compressed.pdf</a>
The textpattern tag returns the proper url.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: tag builder error or change of functionality?
Just a heads up to note that, with the latest release, the new download link generated is
<a href="/File_download/xx/compressed.pdf">compressed.pdf</a>
and not
<a href="/File+download/xx/compressed.pdf">compressed.pdf</a>
used in previous txp versions. What I do not know yet is whether it is txp, my browser, or the zem_redirect plugin [1], which resolve the download link using either urls.
1 Just checked. Even with the plugin off, both urls work just fine.
Last edited by colak (2018-12-28 20:34:09)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: tag builder error or change of functionality?
colak wrote #315807:
Just a heads up to note that, with the latest release, the new download link generated is
<a href="/File_download/xx/compressed.pdf">compressed.pdf</a>...
and not
<a href="/File+download/xx/compressed.pdf">compressed.pdf</a>...
It is actually file_download
. I prefer this language-agnostic URL to localized versions, which get invalid when you change the site language. Moreover, on the admin side the strings are pulled from the current user language, which can be different from the public site language.
Offline
Re: tag builder error or change of functionality?
etc wrote #315808:
I prefer this language-agnostic URL to localized versions
Having had twelve years to think about it, I agree! We should look towards migrating these special links to proper language-agnostic URLs as we expand the scope of our supported URL schemes and phase out the language dependent versions (perhaps with some core redirects? Not sure…)
Moreover, on the admin side the strings are pulled from the current user language, which can be different from the public site language.
Yes, that’s a real bind, which I totally overlooked when we permitted per-user admin langs.
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
Online
Re: tag builder error or change of functionality?
OK… I’ll update all my file_download links:) There seems to be a discrepancy.
On www.neme.org/publications/ we are allowing free downloads of our publications and the code I am using is
<txp:file_download_link id="xx">Download yy.pdf</txp:file_download_link>
The generated links are <a href="/File+download/xx/...
.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: tag builder error or change of functionality?
Maybe I should make the above report clearer re the discrepancy.
The tag builder returns /File_download/xx/
urls, whilst the file_download_link
tag returns /File+download/xx/
. They currently both work for downloading files but shouldn’t the tags and tag builder be synchronised?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: tag builder error or change of functionality?
colak wrote #315830:
The tag builder returns
/File_download/xx/
urls, whilst thefile_download_link
tag returns/File+download/xx/
. They currently both work for downloading files but shouldn’t the tags and tag builder be synchronised?
It’s easy to switch to the language agnostic file_download
format, but the opposite way is tricky because tag builder uses the logged in user language, which can be different from the public one. So I would suggest the former, but this would imply that URLs generated by <txp:file_download_link />
all of a sudden switch from /File+download/xx/
to /file_download/xx/
. Wouldn’t this bother SE?
Offline
Re: tag builder error or change of functionality?
I’m not sure what SE means but reverting to the language agnostic format would not bother me. Having said that, my sites are mostly in en-gb.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: tag builder error or change of functionality?
colak wrote #316677:
I’m not sure what SE means
Search Engine maybe ?
[…] but reverting to the language agnostic format would not bother me. Having said that, my sites are mostly in en-gb.
Based on this commit I’m guessing that /file_download/
will be used everywhere (4.8 or 4.7.3?). That is perfectly fine with me, consistent URL from wherever one fetches it.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline