Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-12-14 17:11:51

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Where is my wrong tag?

Hello,
on production server I have this error:

Errore tag:  <txp:title /> ->  Textpattern Notice: Article tag cannot be used outside of article context on line 2323

textpattern/lib/txplib_misc.php:2323 trigger_error()
textpattern/publish/taghandlers.php:2270 assert_article()
textpattern/publish.php:1188 title()
textpattern/publish.php:1100 processTags()
textpattern/publish/taghandlers.php:3219 parse()
textpattern/publish.php:1188 if_individual_article()
textpattern/publish.php:1113 processTags()
textpattern/lib/txplib_misc.php:1706 parse()
textpattern/publish/taghandlers.php:314 parse_form()
textpattern/publish.php:1188 output_form()

Is there any way from the stacktrace, or debug bottom-of-page info, to find out where the error is?

Thanks!

Offline

#2 2012-12-14 17:49:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Where is my wrong tag?

FAQ

Offline

#3 2012-12-14 20:25:51

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Where is my wrong tag?

Manaus wrote:

Is there any way from the stacktrace, or debug bottom-of-page info, to find out where the error is?

If I’m not mistaken, the error is repeated in the tag trace right after the tag that causes it, so you should be able to locate the offending tag.

Not mentioned in the FAQ Ruud linked to: you can also wrap the tag in <txp:if_individual_article> tags to get rid of the error.

Offline

#4 2012-12-14 21:25:18

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Where is my wrong tag?

Article tag cannot be used outside of article context

Sounds like it’s about an article tag itself but in fact isn’t.

Edit: What I meant is that the message could be a bit truer, perhaps even “Certain tags cannot be used outside of article context” would be tad less misleading for beginners. But, if possible, naming the tag in question would be best.

Last edited by uli (2012-12-14 22:18:05)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2012-12-14 23:02:06

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Where is my wrong tag?

The tag in question is <txp:title />, which is somewhere in <txp:if_individual_article>, which is part of a form, because I see <txp:output_form> (see the stack trace).

Offline

#6 2012-12-14 23:02:26

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

Re: Where is my wrong tag?

uli wrote:

if possible, naming the tag in question would be best.

Eh? The reported error is:

<txp:title /> ->  Textpattern Notice: Article tag cannot be used outside of article context

So the tag in question is already mentioned… or have I missed your point? [Edit: ruud beat me to it by 20 seconds]

We also have File tag cannot be used outside of file context, and so on for all content types, which is more specific — and hopefully therefore more helpful — than a generic “Certain tags”.

Either way, the usual culprit is when using tags on a list/landing page so I’d start there if the tag trace doesn’t give any obvious joy.

Last edited by Bloke (2012-12-14 23:03:08)


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

#7 2012-12-15 00:14:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Where is my wrong tag?

… something ate up my brain. So much space now …


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2012-12-15 00:44:57

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

Re: Where is my wrong tag?

uli wrote:

… something ate up my brain. So much space now …

Peanuts. Shake a head, one pops out.

Offline

#9 2012-12-17 16:59:40

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: Where is my wrong tag?

Thanks guys
Oddly, the error comes from this breacrumb attempt:

<txp:breadcrumb title="1" link="1" label="Home" wraptag="" />
<txp:if_individual_article> &raquo; <txp:title /></txp:if_individual_article>

Which never gave me errors before…

Last minute note: Looks like <txp:title /> is conflicting with gbp_permanent_links

Last edited by Manaus (2012-12-17 17:08:21)

Offline

Board footer

Powered by FluxBB