Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2020-07-22 15:07:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,740
Website GitHub

Re: Textpattern 4.8.2 is nearly ready

colak wrote #324775:

The errors I get are only when I am on debug or testing mode. When I switch to live mode the site behaves as expected.

They will disappear! But your site won’t be functioning as expected. It’ll have things missing in the source markup because the contexts are incorrect in a few places. That’s what the warnings are for: to show you where the context isn’t set so you can go and wrap it with a valid context or revisit your page flow to fix them :)


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

#50 2020-07-22 15:42:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,862
Website GitHub Twitter

Re: Textpattern 4.8.2 is nearly ready

Indeed I will be checking them.

I did come across an error unexpected behaviour which I know that it appeared here before. I haven’t got time to find it now but here is how to reproduce it.

<txp:if_yield name="img">
<txp:image id='<txp:yield name="img" />' />
<txp:else />
no image
</txp:if_yield>

If the above is saved in a form and called by a shortcode like <txp::img img /> it returns 1.


Yiannis
——————————
neme.org | hblack.net | EMAP | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#51 2020-07-22 16:31:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,740
Website GitHub

Re: Textpattern 4.8.2 is nearly ready

colak wrote #324778:

If the above is saved in a form and called by a shortcode like <txp::img img /> it returns 1.

Are you sure this still happens in 4.8.2-dev? It was fixed (we hope!) early on in the dev cycle. I tried it with <txp::img img="42" /> and saw the given image.

If you truly meant <txp::img img /> then yes it will fail, because passing ‘true’ into the ID attribute of the <txp:image> tag in the shortcode will casue it to return unknown image.

Last edited by Bloke (2020-07-22 16:31:31)


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

#52 2020-07-22 16:41:28

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,862
Website GitHub Twitter

Re: Textpattern 4.8.2 is nearly ready

Bloke wrote #324779:

If you truly meant <txp::img img /> then yes it will fail, because passing ‘true’ into the ID attribute of the <txp:image> tag in the shortcode will casue it to return unknown image.

This is what I meant and the result in the demo site (Development Textpattern 4.8.2-dev, and my pre release install) for the above is

<img src="https://release-demo.textpattern.co/images/1.png" alt="A blue rectangle with a linear gradient. This image is not included with Textpattern. It is provided here as demonstration content." width="2000" height="1055" />

but maybe this is expected?


Yiannis
——————————
neme.org | hblack.net | EMAP | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#53 2020-07-22 16:55:44

etc
Developer
Registered: 2010-11-11
Posts: 4,660
Website GitHub

Re: Textpattern 4.8.2 is nearly ready

It looks ok right now, I see no problem. Valueless img is equivalent to img="1" in shortcodes.

Offline

#54 2020-07-22 17:07:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,862
Website GitHub Twitter

Re: Textpattern 4.8.2 is nearly ready

etc wrote #324781:

It looks ok right now, I see no problem. Valueless img is equivalent to img="1" in shortcodes.

I guess you are right as it is the only way to achieve those shorthands.


Yiannis
——————————
neme.org | hblack.net | EMAP | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#55 2020-07-22 17:14:29

etc
Developer
Registered: 2010-11-11
Posts: 4,660
Website GitHub

Re: Textpattern 4.8.2 is nearly ready

All txp tags output strings, so valueless boolean true becomes 1 when output via <txp:yield />.

Offline

#56 2020-07-23 11:31:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,740
Website GitHub

Re: Textpattern 4.8.2 is nearly ready

In the process of localising the comment notification messages I noticed that it was super trivial to tweak comments so that if moderation is on and you’re logged in to Txp, any comment you post on the public site is automatically accepted as visible.

Please try this out from logged-in and not-logged in sessions.


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

#57 2020-07-23 12:56:03

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,453
Website

Re: Textpattern 4.8.2 is nearly ready

When logged in, I post a comment and get the usual pending moderation message. But I also got an email notification because I’ve enabled that option. When I look in the Content | Comments panel, my comment is still unmoderated.

So I logged out, and now the Comments forms have all disappeared, so can’t post any comments to test. When I Show it, I am taken to a blank page with just Nav bar at top, Comments title on left and search, show spam and display options on the right – nothing else, no fields, nothing.

When I login again, Comments panel shows my comment is still unmoderated. This time, while logged in, I can show and all is as expected. Except no comments form is showing except for the one I just used before. Mmm… I am pretty sure comments were enabled on all articles, they are on my localhost, but I might be wrong and perhaps just that one – which happens to Article#1 – was enabled, I’ll have to go through it again.


Gud One Blog
Wondrous Healing Wondrous ways to a healthy old age

Offline

#58 2020-07-23 13:01:57

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,453
Website

Re: Textpattern 4.8.2 is nearly ready

With all comments definitely on for all articles, I get the same behaviour. But this time was able to Show the comment without a problem. Oh, hang on, I just realized I’m not using the latest dev, just the one that Gaekwad posted… lol


Gud One Blog
Wondrous Healing Wondrous ways to a healthy old age

Offline

#59 2020-07-23 13:06:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,740
Website GitHub

Re: Textpattern 4.8.2 is nearly ready

I did notice some weirdness with the cookie. I was scratching my head for a while because Txp thought I was logged out (of the public site) when I was actually logged in (to the admin side). Logging out and logging back in again seemed to ‘jolt’ the cookie and wake it up, resetting it. Then everything worked fine.

I’m not sure what causes this behaviour or why the public cookie gets trashed occasionally, but we’ll need to look into it when we revisit the public cookie system in 4.9.

Not sure what’s going on with your admin-side comments panel. Nothing has changed in 4.8 or dev in this regard.

Last edited by Bloke (2020-07-23 13:07:52)


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

#60 2020-07-23 13:09:48

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,453
Website

Re: Textpattern 4.8.2 is nearly ready

Note that admin side tabs were open after I logged out, but was able to navigate to Comment panel OK. Just an observation.


Gud One Blog
Wondrous Healing Wondrous ways to a healthy old age

Offline

Board footer

Powered by FluxBB