Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Notice: Article tags cannot be used outside an article context
Tag error: <txp:some_article_tag /> -> Textpattern Notice: Article tags cannot be used outside an article context on line 2325
In a similar line of thinking that what’s discussed this thread, could we get rid of that notice? Maybe via some yes/no option on Preferences?
I develop in “Testing” mode. I get that an article tag on a non-article context will “fail”. Thankfully, it just returns empty, which I think it’s a Good Thing, even when Zen of Python suggests that errors should never pass silently, but I don’t consider this is an error/bug, but a feature :)
Thanks.
Offline
Re: Notice: Article tags cannot be used outside an article context
What about test/debug verbose levels in the next TXP versions?
For me the dropdown translates to v=0,1,2 anyway :)
Btw: Can those modes be made user dependent?
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Notice: Article tags cannot be used outside an article context
merz1 wrote:
Btw: Can those modes be made user dependent?
They are already, kind of: Their verbosity depends upon a user’s privilege level. See debug.verbose
and debug.backtrace
here.
We can of course expand on that scheme. What do you consider a sensible solution for some permutations of privilege levels and production modes?
Offline
Re: Notice: Article tags cannot be used outside an article context
- Case: ‘User dependent’ translates mainly to if_logged_in. Making small changes on a ‘live’ site I – logged in as admin – sometimes wish to see debug messages while anonymous website visitors won’t. Possible?
- Case: More granularity. Enable debug mode for single/multiple forms and/or pages (and/or articles?) only. Could be a simple on/off switch. Does that make sense?
Regarding the levels v=0,1,2 I am totally fine but maniqui shows a good example. For my case 2 a v=0,2 switch would be sufficient. Others may want an addition recursive=on,off switch.
Edit: Before thinking of an admin-UI ‘switch’ I was thinking of a txp:tag like txp:debug verbose="2" recursive="on" userlevel="admin" output="URL"
. Container mode checks code fragments, single mode checks form/page/article.
Last edited by merz1 (2012-09-27 11:29:51)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: Notice: Article tags cannot be used outside an article context
I’ve filed issue 272 to track this request.
Offline