Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-05-01 14:57:33

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

Nope, I’m guilty too. There are two problems with cache-loaded plugins:

  1. they can populate text strings before core which then considers the task is ‘done’
  2. if forced (via load_lang()), core replaces the whole pack with the db one, dumping all previously loaded strings, unless they are saved in (deprecated) global $textarray.

There is no problem as long as no cache plugin contains textpacks.

Time for 4.8.1..

Offline

#26 2020-05-01 15:31:20

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

I have committed a quick patch, please test. Sorry for the hassle.

Offline

#27 2020-05-01 15:53:39

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

david@druna.cz wrote #322777:

Thanks for the fast reaction, looking forward to a bugfix :)

One last observation (which is probably what you mentioned) – with the following code inside an article (textile enabled, which shouldn’t make a difference in this case)

<txp:variable name="abc" value="O'key 'doc' !" />...

the following gets displayed

O’key txt_quote_single_opendoctxt_quote_single_close !...

I think that has to do with "O'key 'doc' !", where the single opening and closing of the quotes are not recognised. Try "O&#x27;key 'doc' !".


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#28 2020-05-01 17:01:08

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

etc wrote #322784:

I have committed a quick patch, please test. Sorry for the hassle.

That has certainly fixed it, nice one. Will do more testing later.

Soooo, do we un-deprecate $textarray?


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

#29 2020-05-01 19:16:55

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

Bloke wrote #322786:

Soooo, do we un-deprecate $textarray?

Not publicly, we are a serious cms!

There is another small issue with textile: we seem to use Netcarver’s parser when saving an article, but textile in escape calls its Textpattern extension. The difference is mainly quotes: 'quote_single_open' => '&#8216;' in the former vs 'quote_single_open' => gTxt('txt_quote_single_open') in the latter. (How) should we fix it?

Offline

#30 2020-05-01 21:43:39

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

etc wrote #322787:

we seem to use Netcarver’s parser when saving an article, but textile in escape calls its Textpattern extension… (How) should we fix it?

I guess we should be consistent. I presume the entire reason we use gTxt() is to allow for l10n variations in quoting schemes, so it makes sense to use that version.

Any backwards compatibility issues if we swap the call out? Guess there might be some, but if it’s only swapping quotes out and only affects articles that are saved – and using gTxt() will result in more accurate results for international visitors – then I don’t see anyone complaining about the move.


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

#31 2020-05-02 09:45:33

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

Bloke wrote #322788:

I guess we should be consistent.

Kinda false alert, sorry. Actually, on article save the current user’s language is used (English in my case), but escape happens (on the fly) on the public side, so strings are pulled from the site language (Russian). Not sure whether and how this should be changed.

Offline

#32 2020-05-02 10:18:47

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

Re: txt_quote_single_close left after <txp:yield escape="textile" />

etc wrote #322790:

on article save the current user’s language is used (English in my case), but escape happens (on the fly) on the public side, so strings are pulled from the site language (Russian).

Ah yes. Interesting. Hadn’t considered that splitting the admin/site language would affect this. But yes, if we use the admin language to save, then the quotes will be stored using that language and thus rendered ‘incorrectly’ on the front end. English/French quotes would suffer, for example.

Don’t think there’s much we can do about this until we expand the back-end multi-lingual capabilities to have a language column in each content table.


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

Board footer

Powered by FluxBB