Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-09-10 15:37:09

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

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

#2 2012-09-10 16:23:15

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#3 2012-09-10 16:23:48

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

Re: Page template...does not contain a txp:article tag

Well, <txp:article_custom /> is worth nothing for Textpattern.

Offline

#4 2012-09-10 16:29:36

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

Re: Page template...does not contain a txp:article tag

Gocom wrote:

If you want to suppress the message, you can use dummy article tag with pgonly attribute set to 1.

It’s pity one has to launch all that heavy machinery just to avoid a warning, I’d opt for ignoring it.

Offline

#5 2012-09-10 19:08:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,273
Website GitHub

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

#6 2012-09-10 20:36:57

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

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

#8 2012-09-11 01:02:22

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

#9 2012-09-11 07:42:58

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,532
Website GitHub Twitter

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

#10 2012-09-11 13:46:12

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#11 2012-09-12 00:09:27

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Page template...does not contain a txp:article tag

here here. +here

Offline

#12 2012-09-12 04:49:47

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

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

Board footer

Powered by FluxBB