Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
Re: Act on article status in any context
It looks like the second pass has always been there.
Offline
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
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
Offline
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
Offline