Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 5,028
Website GitHub

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: 11,250
Website GitHub

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

Online

#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: 11,250
Website GitHub

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

Online

#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: 5,028
Website GitHub

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

#21 2020-05-01 12:01:09

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

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

etc wrote #322778:

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).

That’s odd. Maybe it’s something else, or a combination of factors. Did you try with com_connect, btw? That triggers it for me on 4.8.1-dev.

Edit: although it’s not a clean build of 4.8.1… it’s full of junk. This is the same site that misbehaves with smd_tags, while a clean install works fine with it. So, uhh, dunno.

Last edited by Bloke (2020-05-01 12:07:54)


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

#22 2020-05-01 13:03:10

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

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

Nope. Confirmed on a clean build. In fact, in this case it doesn’t matter if the article is set to parse Textile or Leave Text Untouched. I still get the erroneous txt_quote_single_open showing up when used directly inside parse().

This is weird. Steps to reproduce:

1) Install 4.8.1-dev
2) Make a form called ‘test’ with this content:

<txp:php>
echo parse('<txp:yield escape="textile" />');
echo gTxt('txt_quote_single_open');
</txp:php>

3) Create an article and put this content in it:

Some *bold* text.

FORM CONTENT:
<txp::test>
O'key 'doc' !
</txp::test>

ARTICLE CONTENT:
==<txp:php>
echo("O'keys 'doc' !").br;
echo gTxt('txt_quote_single_open');
</txp:php>== 

4) Create a directory somewhere to house plugins cache, drop com_connect.php in there.
5) Visit prefs panel and give it the location of your plugin cache dir above.
6) View the article on the front end.

Expected:

Some bold text.

FORM CONTENT:


O’key ‘doc’ !
‘

ARTICLE CONTENT:
O'keys 'doc' !
‘

Actual:



Some bold text.

FORM CONTENT:


O’key ‘doc’ !
txt_quote_single_open

ARTICLE CONTENT:
O'keys 'doc' !
txt_quote_single_open

7) Remove the com_connect.php plugin or rename its extension, or take out the plugin_cache_dir pref.
8) Refresh the article on the front end. Result: correct interpretation of the quote character inside parse().
9) Reinstate the com_connect.php plugin / plugin_cache_dir pref
10) Edit article to Leave Text Untouched
11) Refresh the article again on the front end.
12) Result the Form content is also not parsed correctly and outputs txt_quote_single_opendoctxt_quote_single_close.

*scratches head* Baffled.

Last edited by Bloke (2020-05-01 13:06:10)


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

#23 2020-05-01 14:16:37

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

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

Removing $plugin['textpack'] from plugins code seems to fix the problem. Weirdo

Offline

#24 2020-05-01 14:45:00

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

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

etc wrote #322781:

Removing $plugin['textpack'] from plugins code seems to fix the problem. Weirdo

So it’s a Textpack import issue. Hmmm. That means either the realtime Textpack merge routine is bunked (probably) or plugin load. My money’s on the former, since a) I wrote it, and b) if it was the latter then the effect would probably be noticed after regular plugin install, which is not the case here. Drat.


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

Board footer

Powered by FluxBB