Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2019-01-09 18:22:07

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

Re: Act on article status in any context

These warnings are normal. Though the content of hide is not processed, it is still syntactically analysed. That’s why I always wanted to make the debug output invisible to the outer world, but this would make errors less easily detectable.

If we stumble upon a case where two passes do not suffice, increasing their number is straightforward.

Offline

#17 2019-01-10 10:40:35

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

Re: Act on article status in any context

Can one of you remind me/us why there are several processing passes (or point me to somewhere where it’s described). I’ll gladly write a tip on textpattern.tips but the briefest of background would help…


TXP Builders – finely-crafted code, design and txp

Offline

#18 2019-01-10 12:02:26

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

Re: Act on article status in any context

I originally thought two passes were required to support things like pagination tags that can’t necessarily be evaluated in a single pass if things are used “out of order” (e.g. if pagination comes before an article tag, for instance). However, this notion might be misguided because, until 4.7.0, you couldn’t do it anyway and had to rely on pgonly.

According to the commit in which it was introduced by Sencer the message was the rather cryptic:

Adding if_preview and some (potentially experimental) stuff to customize previews. More details to follow…

No details seemed to follow.

Upshot: your guess is as good as mine!


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

#19 2019-01-10 13:20:34

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

Re: Act on article status in any context

It looks like the second pass has always been there.

Offline

#20 2019-01-10 13:28:39

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

Re: Act on article status in any context

Ah yes, indeed you are right. I was just hunting for mention of secondpass explicitly, which surfaced in 4.0.2.

So the reason for its inclusion is definitely lost in the mists of time amid Dean’s initial vision.


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

#21 2019-01-10 13:57:15

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

Re: Act on article status in any context

So that means it does 2(+) passes but we don’t know quite why ;-)

But now we have found a reason.


TXP Builders – finely-crafted code, design and txp

Offline

#22 2019-01-10 14:19:29

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

Re: Act on article status in any context

Aesthetics, I guess. As Dean used to say,

The function so nice, he ran it twice.

Lost, unfortunately. But the second pass is so widely (ab)used in various tips that we can not get rid of it.

Offline

#23 2019-01-10 14:35:06

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

Re: Act on article status in any context

The function so nice, he ran it twice.

Very funny.

But the second pass is so widely (ab)used in various tips that we can not get rid of it.

Can you give me some examples? Aside from what you showed us here, I was trying to understand what it’s good for.


TXP Builders – finely-crafted code, design and txp

Offline

#24 2019-01-10 14:48:42

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

Re: Act on article status in any context

Like here? :-)

Offline

Board footer

Powered by FluxBB