Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-05-31 06:14:11

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,242
GitHub

Feedback to: Textpattern CMS 4.8.1 Released

Please provide any feedback here related to Textpattern 4.8.1 Released.

We appreciate all feedback. Please check the issue queue before raising a problem.

Offline

#2 2020-05-31 15:38:24

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

Thanks so much guys. Updated and I am experiencing no obvious hitches.


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

Offline

#3 2020-06-02 11:20:42

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: Feedback to: Textpattern CMS 4.8.1 Released

Hi

Updated a website form 4.6.2 to 4.8.1 without a hitch, i had only updated the Glz custom field to the newer version (thanks jacob for this).

Thanks Devs.

NB. I tryed to use php 7.3 but got error message then i stuck to 7.1 (The 7.2 version seems to have problem to be setting in my hosting)

Offline

#4 2020-06-02 13:44:39

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: Feedback to: Textpattern CMS 4.8.1 Released

Thank you, upgraded two websites today, in seconds.

And a few dozen minutes to rewrite image captions from my custom txp::figure. Sorry, I am not a programmer, and do not quite understand my former code :(

	<figure>
<txp:image yield="id" /> <txp:if_yield>
<figcaption><txp:yield escape="tidy,textile" /></figcaption> <txp:else />
<txp:image_info yield="id" escape="tidy,textile" wraptag="figcaption" /> </txp:if_yield>
	</figure>

Which now returns only number “1” (with no quotes) instead of description from a Caption field of the image.

I would be grateful for some solution to restore former copying of caption from a database, when it is not provided in an article.

Last edited by Vienuolis (2020-06-02 13:44:57)

Offline

#5 2020-06-02 13:49:33

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

Vienuolis wrote #323494:

Thank you, upgraded two websites today, in seconds.

And a few dozen minutes to rewrite image captions from my custom txp::figure. Sorry, I am not a programmer, and do not quite understand my former code :(

<figure>...

Which now returns only number “1” (with no quotes) instead of description from a Caption field of the image.

I would be grateful for some solution to restore former copying of caption from a database, when it is not provided in an article.

Do you have that snippet in a form and then call it in the articles?


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

Offline

#6 2020-06-02 14:25:12

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

Vienuolis wrote #323494:

now returns only number “1” (with no quotes) instead of description from a Caption field of the image.

Drat. It only happens if used inside <txp:if_yield> so I suspect it’s to do with the shortcode ‘else’ capability. Damn damn damn. We must get some unit testing in place for at least the tag suite. I’m going to elevate this as a priority.

Doesn’t even work if you try and cheat by setting the caption beforehand:

<figure>
<txp:image yield="id" />
<txp:variable name="caption"><txp:image_info yield="id" wraptag="figcaption" escape="tidy,textile" /></txp:variable>
<txp:if_yield>
   <figcaption><txp:yield escape="tidy,textile" /></figcaption>
<txp:else />
   <txp:variable name="caption" />
</txp:if_yield>
</figure>

Sorry for the hassle. In the meantime, Oleg or someone might be able to come up with a clever workaround or tag structure until we figure out what’s going on.

Last edited by Bloke (2020-06-02 14:26:07)


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 2020-06-02 14:46:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: Feedback to: Textpattern CMS 4.8.1 Released

Do you have any luck when you don’t use yield as an attribute of another tag? (I didn’t even know about that). Something like this:

<txp:images id='<txp:yield name="id" />'>
<figure>
     <txp:image />
<txp:if_yield>
     <txp:yield escape="tidy,textile" wraptag="figcaption" />
<txp:else />
     <txp:image_info escape="tidy,textile" wraptag="figcaption" />
</txp:if_yield>
</figure>
</txp:images>

I use this tag-in-tag method predominantly and didn’t notice 4.8.1 failing on my shortcodes.


TXP Builders – finely-crafted code, design and txp

Online

#8 2020-06-02 15:19:47

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

jakob wrote #323499:

Do you have any luck when you don’t use yield as an attribute of another tag?

Sadly not; same issue. As soon as you wrap anything in <txp:if_yield> the ‘else’ part returns 1 instead of the content of any tags.


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

#9 2020-06-02 15:42:17

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

Bloke wrote #323501:

Sadly not; same issue. As soon as you wrap anything in <txp:if_yield> the ‘else’ part returns 1 instead of the content of any tags.

I cannot replicate this and I am using if_yield in many pages of our site. In this text for example, I use a short tag the form of which contains:

<txp:if_yield name="caption">
<figure<txp:if_yield name="class"> class="<txp:yield name="class" />"</txp:if_yield>>
<txp:image id='<txp:yield name="id" />' />
<figcaption class="grid_24"><txp:yield name="caption" escape="tidy,textile" /></figcaption>
</figure>
<txp:else />
<txp:image id='<txp:yield name="id" />'<txp:if_yield name="class"> class='<txp:yield name="class" />'</txp:if_yield> />
</txp:if_yield>

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

Offline

#10 2020-06-02 15:53:39

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

I think it’s okay if you use <txp:if_yield> with an attribute. It just fails if you try to get the shortcode’s container. Thus a workaround to Vienuolis’ code is potentially:

<figure>
<txp:image yield="id" />
<txp:if_yield name="caption">
   <figcaption><txp:yield name="caption" escape="tidy,textile" /></figcaption>
<txp:else />
   <txp:image_info yield="id" wraptag="figcaption" escape="tidy,textile" />
</txp:if_yield>
</figure>

That just means the caption attribute has to be passed in via a shortcode attribute, instead of using the container to hold a custom caption.


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

#11 2020-06-02 16:24:20

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: Feedback to: Textpattern CMS 4.8.1 Released

Yes, the caption is returned to figcaption, while name="caption" is included in txp:if_yield — thank you, Stef!

Offline

#12 2020-06-02 18:04:14

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

Re: Feedback to: Textpattern CMS 4.8.1 Released

What a buffoon I am! Line 534 of taghandlers.php should be

$yield[] = isset($thing) ? array($thing) : null;

There is no other way to fix it. I truly apologize.. :-(

Offline

Board footer

Powered by FluxBB