Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Page template...does not contain a txp:article tag
But, but… it does have a txp article tag.
The desired scenario is, when in a different page/section and a category link is clicked, you arrive at the “archive” (whatever) page and get a little message that confirms the category the person clicked is correct, provides a list of the articles in that category (title and date only), and finishes with the full list of categories so they can choose something else if they want.
The archive landing page code is this. I no doubt have it all wrong. I’ve tried if_category
and if_the_red_pill
but same results…
<txp:if_article_list>
<p>Clever <strong><txp:category /></strong> acknowledgment here.</p>
<txp:article_custom category='<txp:category />' form="lstArchives" sort="posted desc" wraptag="ul" class="cat-items" break="li" section="articles" limit="50" />
<txp:else />
<txp:article status="sticky" form="excerpt-only" />
</txp:if_article_list>
What I get is this error message, and the tag trace is a zillion miles long and make no sense to me…
Tag error: -> Textpattern Notice: Page template article-categories does not contain a txp:article tag while parsing form None on page article-categories
textpattern/publish.php:551 trigger_error()
index.php:84 textpattern()
(Waits for maniqui to rub it in…)
Offline
Re: Page template...does not contain a txp:article tag
Destry wrote:
But, but… it does have a txp article tag.
In that snippet you posted, only when you are on individual article page. That snippet doesn’t contain article tag for any other context page thus the message.
What I get is this error message, and the tag trace is a zillion miles long and make no sense to me…
It’s just an informal message. You can ignore it. It won’t do anything, there is no actual error anywhere, it just informs that there isn’t an article tag present to handle the context sensitive page content. The message will go away once you turn the production status to live.
If you want to suppress the message, you can use dummy article tag with pgonly attribute set to 1.
Offline
Re: Page template...does not contain a txp:article tag
Well, <txp:article_custom />
is worth nothing for Textpattern.
Offline
Offline
Re: Page template...does not contain a txp:article tag
I’d rather lose the warning altogether, since it’s perfectly valid to not have an article on a page, e.g. a photoblog made up of <txp:images />
directly in a page template, or a list of links. Meh.
Last edited by Bloke (2012-09-10 19:09:13)
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
Re: Page template...does not contain a txp:article tag
Thanks, guys!
Helpful, Gocom, thank you!
Okay, so I don’t have to worry about the error messages, actually. I was kind of wondering if that was the case.
In that case, I agree with Stef, don’t say anything is an error if it’s not really a “life support” error. System messages are probably the most important kinds of UI dialog. If I (a user of eight years) can’t figure out what is going on with the UI messages, then there’s a problem with UI communication. Like Stef says, either they need to be dropped, or they need to specify what a particular problem is—accurately.
This is still one of my favorite books (few on the subject), Defensive Design for the Web: How to improve error messages, help, forms, and other crisis points. As relevant now as it was when first published.
Offline
#7 2012-09-10 22:00:13
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: Page template...does not contain a txp:article tag
Bloke wrote:
I’d rather lose the warning altogether, since it’s perfectly valid to not have an article on a page …
Gets my vote!
Offline
Re: Page template...does not contain a txp:article tag
Bloke wrote:
I’d rather lose the warning altogether, since it’s perfectly valid to not have an article on a page
Gets my vote too :)
Offline
Re: Page template...does not contain a txp:article tag
me too, it s really an annoying message that break the design and make usadd some txp:article only to make disappear!
Offline
Re: Page template...does not contain a txp:article tag
Bloke wrote:
I’d rather lose the warning altogether, since it’s perfectly valid to not have an article on a page …
+1.
I use to comment out the line that echoes that warning.
Offline
Re: Page template...does not contain a txp:article tag
here here. +here
Offline
Re: Page template...does not contain a txp:article tag
Yeah, it used to cause me grief before I learned that I could ignore it with impunity. I did have difficulty convincing a client she could ignore it too.
Last edited by joebaich (2012-09-12 04:50:41)
Offline