Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-10-17 14:22:15
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Getting an error when using status="sticky"
Hi all,
I’m using a article_custom status=“sticky” limit=“1” for the most important article of the week, but whenever I go to it (it’s using the same form as all the others), it gives this error:
“Tag error: <txp:title/> -> Textpattern Notice: Article tags cannot be used outside an article context on line 1887”
What’s causing this? I can’t figure it out. It’s in article context…
Offline
Re: Getting an error when using status="sticky"
Guess you should post your form content so we can take a look.
Offline
#3 2007-10-17 14:59:59
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: Getting an error when using status="sticky"
form (singlePost):
<div id="left">
<div class="setNews">
<div class="setNewsInner">
<h3>
<txp:if_article_category name="news">News Coverage</txp:if_article_category>
<txp:if_article_category name="articles">Articles</txp:if_article_category>
<ul id="controls">
<li class="previous">« <span><txp:jk_link_to_prev cat="current">previous</txp:jk_link_to_prev></span></li>
<li class="home"><span><a href="/<txp:section title="0" />">home</a></span></li>
<li class="next"><span><txp:jk_link_to_next cat="current">next</txp:jk_link_to_next></span> »</li>
</ul>
</h3>
<h2>
<txp:permlink><txp:title /></txp:permlink>
<div id="addthis">
</div>
</h2>
<p class="author">
by <txp:author /> on <txp:posted />
</p>
<div class="body">
<txp:body />
<txp:comments_invite />
</div>
</div>
</div>
</div>
<div id="right">
<div class="setFeed">
<div class="setFeedInner">
<h3>
Feed
</h3>
</div>
</div>
<div class="asb">
</div>
</div>
That’s the form. Nothing special that I see.
Here’s the main page that calls it:
<txp:output_form form="includeHeader" />
<txp:if_individual_article>
<txp:php>
global $pretext;
extract(chopUrl($pretext['req']));
if($u3 === 'comments')
{
echo parse('
<txp:article form="comments_display" />
');
}else{
echo parse('
<txp:article form="singlePost" />
');
}
</txp:php>
<txp:else />
<txp:output_form form="index" />
</txp:if_individual_article>
<txp:output_form form="includeFooter" />
Last edited by ruud (2007-10-22 20:04:14)
Offline
Re: Getting an error when using status="sticky"
Yes I don’t see anything wrong with that either. Seems like txp article is already called, so txp title should be ok in the form. Think we need a TXP PHP expert for this one…
Offline
Re: Getting an error when using status="sticky"
It seems to be a bug (already fixed in svn) affecting sticky articles.
Article tags don’t seem to work in page templates when you are in an sticky-article-context.
Offline
#6 2007-10-18 01:53:48
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: Getting an error when using status="sticky"
I applied these changes: http://dev.textpattern.com/changeset/2636 and now there’s no error, but nothing’s displayed.
So is there no fix for this?…
Offline
Re: Getting an error when using status="sticky"
tag trace, please.
Offline
#8 2007-10-18 08:04:28
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: Getting an error when using status="sticky"
<!-- Runtime: 0.0171 -->
<!-- Query time: 0.006521 -->
<!-- Queries: 14 -->
<!-- Memory: 2401Kb, <txp:article form="singlePost" /> -->
<!-- txp tag trace:
[SQL (0.000135): select name from txp_lang where lang='en-us' limit 1]
[SQL (0.002677): select name, data from txp_lang where lang='en-us' AND ( event='public' OR event='common')]
[SQL (0.000326): select name, code, version from txp_plugin where status = 1]
[SQL (0.000165): select ID,Section from textpattern where url_title like 'superstars-idra-to-estro' AND Section='starcraft' and Status >= 4 limit 1]
[SQL (0.000190): select * from txp_section where name = 'starcraft' limit 1]
[SQL (0.000441): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=11 and Status in (4,5)]
[article 11]
[SQL (0.000595): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2007-10-17 03:35:34' and Section = 'starcraft' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000416): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2007-10-17 03:35:34' and Section = 'starcraft' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000125): select user_html from txp_page where name='default']
[Page: default]
<txp:output_form form="includeHeader" />
[SQL (0.000139): select Form from txp_form where name='includeHeader']
[Form: includeHeader]
<txp:if_section name="">
[<txp:if_section name="">: false]
<txp:section title="1" />
[SQL (0.000131): select title from txp_section where name='starcraft']
</txp:if_section>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:title/>
</txp:if_individual_article>
<txp:section title="0" />
<txp:if_individual_article>
[<txp:if_individual_article>: true]
</txp:if_individual_article>
<txp:if_section name="">
[<txp:if_section name="">: false]
</txp:if_section>
<txp:if_section name="starcraft">
[<txp:if_section name="starcraft">: true]
</txp:if_section>
<txp:if_section name="starcraft2">
[<txp:if_section name="starcraft2">: false]
</txp:if_section>
<txp:output_form form="alb" />
[SQL (0.000130): select Form from txp_form where name='alb']
[Form: alb]
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:php>
<txp:article form="singlePost" />
</txp:php>
</txp:if_individual_article>
<txp:output_form form="includeFooter" />
[SQL (0.000131): select Form from txp_form where name='includeFooter']
[Form: includeFooter]
[ ~~~ secondpass ~~~ ]
-->
Last edited by ruud (2007-10-22 19:56:59)
Offline
#9 2007-10-22 19:05:50
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: Getting an error when using status="sticky"
Still nothing on this?…
Offline
Re: Getting an error when using status="sticky"
Put the following at the top of your singlePost form and post here what extra output it shows:
<txp:php>global $thisarticle; dmp($thisarticle);</txp:php>
Btw, if you’re upgrading part of TXP to revesion 2636, might as well upgrade your entire TXP install to that version. Perhaps some of the changes in the file you updated depend on changes in other files as well.
Last edited by ruud (2007-10-22 20:09:20)
Offline