Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#46 2025-12-26 18:05:27

mistersugar
Member
From: North Carolina
Registered: 2004-04-13
Posts: 171
Website

Re: Feedback: Textpattern CMS 4.9.0 released

Bloke wrote #341985:

Try switching theme on the pages/forms/styles panel and saving any asset to “store” the current theme, then try again from the Sections panel. Not sure why it wouldn’t have your pref stored for the current theme in use.

This worked. I used Themes ‘Assign sections’ to do this. Thanks!


—-

Anton aka mistersugar – ‘yumi stap storian’ – antonzuiker.com

Offline

#47 2025-12-26 18:07:55

mistersugar
Member
From: North Carolina
Registered: 2004-04-13
Posts: 171
Website

Re: Feedback: Textpattern CMS 4.9.0 released

mistersugar wrote #341986:

This worked. I used Themes ‘Assign sections’ to do this. Thanks!

Well, it worked for a second or two. Ok, I’ll stop and do some testing and get my notes in order before I reply again.


—-

Anton aka mistersugar – ‘yumi stap storian’ – antonzuiker.com

Offline

#48 2025-12-26 20:16:36

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

Re: Feedback: Textpattern CMS 4.9.0 released

I have upgraded both of my WWW publications smoothly today, thanks our dev gods!

Unfortunately, all images displayed via yield="id" have disappeared. I am not a programmer, just blindly copied the following code from this forum :)

	<figure<if::yield name="class"> class="<txp:yield name='class' />"</if::yield>>
<txp:image yield="id" loading="lazy" /> <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>

The descriptions from <figcaption> are displayed correctly. And article images are recognized and displayed properly from a similar form:

	<if::article_image><figure class=vaizdas id=esminis>
<txp:image_info id='<txp:custom_field name="article_image" />' escape="tidy,textile" wraptag="figcaption" />
<txp:article_image loading="lazy" />
	</figure></if::article_image>

In testing mode, the error message is as follows:

Tag error: <txp:image yield="id" loading="lazy" /> -> Textpattern Notice: Image tags cannot be used outside an image context. Issue detected while parsing form figure on page skelbimai.

How should I adjust that image context in such custom figure form?

Last edited by Vienuolis (2025-12-26 20:25:21)

Offline

#49 2025-12-26 22:20:23

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

Re: Feedback: Textpattern CMS 4.9.0 released

Vienuolis wrote #341988:

Unfortunately, all images displayed via yield="id" have disappeared. I am not a programmer, just blindly copied the following code from this forum :)

<figure<if::yield name="class"> class="<txp:yield name='class' />"</if::yield>>...

(I would usually do id='<txp:yield name="id" />' where you currently have yield="id", but maybe the notation you have is also possible?)

It looks like the code you copied is for a shortcode form where you specify the image id number. So you would save that in a form – let’s call it figure – and then call it in your template, or in your article body like this:

<txp::figure id="123" class="img-embed" />

where 123 is the image id number. You can also specify multiple image id numbers, e.g. 12, 23, 34, and optionally omit the class if you don’t need it. Used as a self-contained tag, it automatically pulls in the image caption saved with the respective image, but you can override that by using it as a container tag, e.g.:

<txp::figure id="123" class="img-embed">My  custom caption _with textiled text_.</txp::figure>

If you save your form as another name, your tag will be <txp:formname ….


TXP Builders – finely-crafted code, design and txp

Offline

#50 2025-12-27 07:31:33

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

Re: Feedback: Textpattern CMS 4.9.0 released

id='<txp:yield name="id" />' instead of yield="id" fixed the loss, thank you very much, dear Julian! Yes, I quoted my shortcode ‘figure’, which is inserted into an article as <txp::figure id="123">.

Offline

#51 2025-12-27 13:12:59

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

Re: Feedback: Textpattern CMS 4.9.0 released

The backend: Content: Write: Sort and display — what to sort?

Textpattern: just write

Perhaps it would be more appropriate to ask: “How and where to display”? Or, avoiding the question: “Destination”.

The last collapsing option was “Ten last editetd articles” — is it removed or just invisible for me?

Offline

#52 2025-12-27 14:04:02

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

Re: Feedback: Textpattern CMS 4.9.0 released

Vienuolis wrote #341993:

Sort and display — what to sort?

There is one other option that appears if your settings allow it (override form). And I guess you are “sorting” the articles into sections. But maybe the group could be slightly better named in Txp 5.

The last collapsing option was “Ten last editetd articles” — is it removed or just invisible for me?

It’s been removed but wet has a plugin that restores it


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

Offline

#53 2025-12-27 15:17:20

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,421
Website GitHub Mastodon

Re: Feedback: Textpattern CMS 4.9.0 released

Bloke wrote #341994:

…but wet has a plugin that restores it

See wet_quickopen.

Offline

#54 2025-12-27 15:25:42

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

Re: Feedback: Textpattern CMS 4.9.0 released

I tried everything I could think of, but I could not clean up the extra empty lines by pulling the image caption from an images panel into ‹figcaption›:

 	<figure>
<img src="https://my.domain/images/123.png" alt="description" width="660" height="440"> 
<figcaption>Long description

</figcaption> 
	</figure>

instead of former

 	<figure>
<img src="https://my.domain/images/123.png" alt="description" width="660" height="440"> 
<figcaption>Long description</figcaption> 
	</figure>

Not a flaw, though… Code is poetry!

Last edited by Vienuolis (2025-12-27 15:39:32)

Offline

#55 2025-12-27 16:25:24

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

Re: Feedback: Textpattern CMS 4.9.0 released

See wet_quickopen.

Thanks, dear Robert! I installed both plugins, switched Active: No to Yes, and left the default Order: 5. Oddly, the additional option for Recent articles did not appear, even though there were no warnings. And after disabling script blockers, and using other browsers.

Offline

#56 2025-12-27 16:36:18

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,421
Website GitHub Mastodon

Re: Feedback: Textpattern CMS 4.9.0 released

Odd. Are they any messages when you switch production mode to Debug in Prefs?

Offline

#57 2025-12-27 17:11:56

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

Re: Feedback: Textpattern CMS 4.9.0 released

wet wrote #341998:

Odd. Are they any messages when you switch production mode to Debug in Prefs?

No related to your plugins, only for an outdated one:

tru_tags (3.9.2) -> 8192: Creation of dynamic property tru_tags_pref::$name is deprecated on line 999…

Offline

#58 2025-12-27 17:52:07

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

Re: Feedback: Textpattern CMS 4.9.0 released

Vienuolis wrote #341996:

I tried everything I could think of, but I could not clean up the extra empty lines by pulling the image caption from an images panel into ‹figcaption›:

It’s probably the extra formatting from textiling. Try this:

<figure<if::yield name="class"> class="<txp:yield name='class' />"</if::yield>>
    <txp:image id='<txp:yield name="id" />' loading="lazy" />
    <txp:if_yield>
        <txp:yield escape="p,tidy,textile" wraptag="figcaption" trim />
    <txp:else />
        <txp:image_info id='<txp:yield name="id" />' escape="p,tidy,textile" wraptag="figcaption" trim />
    </txp:if_yield>
</figure>

This just adds the trim attribute and an extra p in the escaping to drop the p wrapper-tag produced by textile.

For absolute code-output OCD with no blank lines, you could wrap the entire figcaption output in a variable that you also trim and output in place:

<figure<if::yield name="class"> class="<txp:yield name='class' />"</if::yield>>
    <txp:image id='<txp:yield name="id" />' loading="lazy" />
    <txp:variable name="figcaption" output trim>
    <txp:if_yield>
        <txp:yield escape="p,tidy,textile" wraptag="figcaption" trim />
    <txp:else />
        <txp:image_info id='<txp:yield name="id" />' escape="p,tidy,textile" wraptag="figcaption" trim />
    </txp:if_yield>
    </txp:variable>
</figure>

but as you say, it has no relevance for the page output itself.


TXP Builders – finely-crafted code, design and txp

Offline

#59 2025-12-27 18:04:04

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,421
Website GitHub Mastodon

Re: Feedback: Textpattern CMS 4.9.0 released

In reply to Vienuolis #341999:

We’d rather not hijack this thread for plugin support issues. If you want to, please add a message here.

Offline

#60 2025-12-27 20:41:48

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

Re: Feedback: Textpattern CMS 4.9.0 released

Yes! p does not seem necessary, but trim appears to be essential.

It is also noteworthy that trim does not work before escape, only after:

<figcaption><txp:yield trim escape=“tidy,textile” /></figcaption>

<figcaption><txp:yield escape=“tidy,textile” trim /></figcaption>

Thank you again, jacob! The code is poetry!

Offline

Board footer

Powered by FluxBB