Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-12-12 19:22:13

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

#2 2018-12-12 20:08:42

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: tag builder error or change of functionality?

Looks like a bug (that we have patched in download links, but not in tagbuilder). Will be fixed, thanks.

Offline

#3 2018-12-13 06:19:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

#4 2018-12-28 20:28:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

#5 2018-12-28 21:26:37

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#6 2018-12-28 22:17:35

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

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

Offline

#7 2018-12-29 06:47:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

#8 2018-12-29 16:37:38

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

#9 2019-02-21 12:15:46

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: tag builder error or change of functionality?

colak wrote #315830:

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?

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

#10 2019-02-21 12:58:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

#11 2019-02-23 09:18:26

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,051
Website

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

Board footer

Powered by FluxBB