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,731
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,386
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,559
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: 327
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,386
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: 12,455
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.

Hire Txp Builders – finely-crafted code, design and Txp

Online

#7 2020-06-02 14:46:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,204
Website GitHub

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

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
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.

Hire Txp Builders – finely-crafted code, design and Txp

Online

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
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: 12,455
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.

Hire Txp Builders – finely-crafted code, design and Txp

Online

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

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 327
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,677
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

#13 2020-06-02 18:14:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Re: Feedback to: Textpattern CMS 4.8.1 Released

etc wrote #323507:

What a buffoon I am!

Haha! Don’t worry about it, and thanks for fixing it. My fault for mentioning the feature and not testing it thoroughly enough.

There’s a workaround for now, but we could squeeze 4.8.2 out in a week or two to patch this and anything else we spot. Won’t affect 4.9 work as that’s got its own branch (dev).

EDIT: though, annoyingly, when merging from 4.8.2 to dev, it pulls the version numbers from 4.8.2 and overwrites the dev ones. So with each merge we need to manually readjust textpattern/textpattern.js, textpattern/index.php and package.json. No biggie. Just something to be aware of. Quite why git thinks 4.9.0 is greater than 4.8.2 and splats the higher values instead of creating merge conflicts or figuring it out, I’m not sure. Maybe it’s a bug and I need to upgrade my local git environment. I’m running 2.8.1, which is way out of date.

Last edited by Bloke (2020-06-02 18:48:56)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Online

#14 2020-06-23 10:22:02

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: Feedback to: Textpattern CMS 4.8.1 Released

Updated three sites from 4.8.0 to 4.8.1 without any problem yet.

PHP version: 7.3.19-1+0~20200612.60+debian8~1.gbp6c8fe1
GD Graphics Library: 2.2.5; Supported formats: GIF, JPEG, PNG, WebP.
MySQL: 5.5.5-10.2.32-MariaDB-10.2.32+maria~jessie-log
Web server: nginx/1.16.1

Offline

#15 2020-06-23 10:25:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Re: Feedback to: Textpattern CMS 4.8.1 Released

Brilliant, thanks @whocarez.

4.8.2 is shaping up nicely for imminent release too. Just mops up a few little issues we discovered, tweaks a couple of tags and enhances some stuff for a smoother ride with international users (see forum.textpattern.com/viewtopic.php?id=50806).


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Online

Board footer

Powered by FluxBB