Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-05-01 10:44:06

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

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

etc wrote #322766:

You can test something like

echo gTxt('txt_quote_single_open');...

in your form, to be sure that the problem does not come from parse().

echo gTxt('txt_quote_single_open');

outputs

txt_quote_single_open

Offline

#12 2020-05-01 10:49:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,328
Website

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

etc wrote #322766:

You can test something like echo gTxt('txt_quote_single_open');... in your form, to be sure that the problem does not come from parse().

On my dev site, I get txt_quote_single_open returned. English on both admin and public site. Doesn’t matter if I have all plugins disabled BUT interestingly, if there are any plugins loaded from the cache directory – any public plugin at all – this bug is triggered.

What. The. Actual…


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

#13 2020-05-01 10:53:46

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

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

Bloke wrote #322770:

On my dev site, I get txt_quote_single_open returned. English on both admin and public site. Doesn’t matter if I have all plugins disabled BUT interestingly, if there are any plugins loaded from the cache directory – any public plugin at all – this bug is triggered.

What. The. Actual…

I just wanted to mention that. I recently fiddled with my first cached plugin. It’s still turned on. And as I remember I didn’t have luck making gTxt() work inside of it either (but that might be just a misuse of it).

EDIT: I confirm that upon removing the path to cached plugins in the settings the problem goes away and a proper quote gets displayed.

Last edited by david@druna.cz (2020-05-01 10:58:36)

Offline

#14 2020-05-01 11:02:24

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

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

Bloke wrote #322763:

Very odd. What language are you using and are the strings for quote characters translated in that language?

<txp:php>...

The code

$siteLang = get_pref('language');
dmp($siteLang, safe_rows('name, data', 'txp_lang', "lang='$siteLang' and name like 'txt%'"));

outputs:

cs
array (
  0 => 
  array (
    'name' => 'txt_quote_double_close',
    'data' => '“',
  ),
  1 => 
  array (
    'name' => 'txt_quote_double_open',
    'data' => '„',
  ),
  2 => 
  array (
    'name' => 'txt_quote_single_close',
    'data' => '‘',
  ),
  3 => 
  array (
    'name' => 'txt_quote_single_open',
    'data' => '‚',
  ),
)

Last edited by david@druna.cz (2020-05-01 11:03:14)

Offline

#15 2020-05-01 11:07:55

etc
Developer
Registered: 2010-11-11
Posts: 3,651
Website

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

david@druna.cz wrote #322771:

I just wanted to mention that. I recently fiddled with my first cached plugin. It’s still turned on. And as I remember I didn’t have luck making gTxt() work inside of it either (but that might be just a misuse of it).

EDIT: I confirm that upon removing the path to cached plugins in the settings the problem goes away and a proper quote gets displayed.

Hmm, then your servitor has introduced a bug while trying to optimize the server load.. will investigate, sorry.

Offline

#16 2020-05-01 11:08:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,328
Website

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

david@druna.cz wrote #322771:

I confirm that upon removing the path to cached plugins in the settings the problem goes away and a proper quote gets displayed.

Thank you.

So the question remains for us to investigate: why does the act of loading a public plugin trigger this odd behaviour. And does it only nobble parse() via forms, or does it affect direct usage in articles too.


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

#17 2020-05-01 11:16:15

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

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

Bloke wrote #322774:

Thank you.

So the question remains for us to investigate: why does the act of loading a public plugin trigger this odd behaviour. And does it only nobble parse() or does it affect direct usage in articles too.

As I mentioned the quote gets diplayed properly in Textile-enabled articles. Or are you asking someting else?

And the above mentioned output of dmp is the same with the cached plugin path set and unset.

Last edited by david@druna.cz (2020-05-01 11:16:28)

Offline

#18 2020-05-01 11:17:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,328
Website

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

david@druna.cz wrote #322775:

As I mentioned the quote gets diplayed properly in Textile-enabled articles. Or are you asking someting else.

Yeah, sorry, that was just me speaking out loud / for us devs to check. We’ll investigate. Thank you for finding this weirdness, and sorry for the hassle.


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

#19 2020-05-01 11:28:41

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

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

Bloke wrote #322776:

Yeah, sorry, that was just me speaking out loud / for us devs to check. We’ll investigate. Thank you for finding this weirdness, and sorry for the hassle.

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' !" />

<txp:variable name="abc" escape="textile" />

the following gets displayed

O’key txt_quote_single_opendoctxt_quote_single_close !

Last edited by david@druna.cz (2020-05-01 11:36:04)

Offline

#20 2020-05-01 11:38:01

etc
Developer
Registered: 2010-11-11
Posts: 3,651
Website

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

I’m out of luck trying to reproduce it. A plugin is loaded from cache, but everything still works fine in my dev setup (it’s 4.8.1-dev though).

Offline

Board footer

Powered by FluxBB