Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-08-27 12:50:35
- BryanA.
- Member

- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Articles appearing despite 'article limit.'
No doubt this is some simple mistake but after a day, I still can’t find it! I understand the principle that articles are being called even after the limit is set, but where in the code is this happening?
<div id=“content”>
<txp:if_section name=”“>
<txp:article limit=“5” />
<txp:if_individual_article>
<p class=“articlenav”>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev> <txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>
</txp:if_individual_article>
<txp:if_article_list>
<p class=“paging”>
<txp:older>Previous</txp:older> <txp:newer>Next</txp:newer>
</p>
</txp:if_article_list>
</txp:if_section>
<txp:if_section name=“about”>
<txp:article form=“Single” />
</txp:if_section>
<txp:if_section name=“contact”>
<txp:article form=“Single” />
</div>
Voice Actor – starting up a site for that good book stuff.
Offline
Re: Articles appearing despite 'article limit.'
I can see 1 unclosed if_section there
<txp:if_section name="contact">
<txp:article form="Single" />
</txp:if_section>
</div>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2007-08-27 20:14:14
- BryanA.
- Member

- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Re: Articles appearing despite 'article limit.'
I made the change but still have a big, long string of articles after the 5 limit. After the 5, the “Previous” is there.
www.gawkercomputers.com
I wish I could tell you that there some reasoning found in the pattern of displayed articles; but for me there isn’t.
1,2,3,4,5
Previous
1,2,3,4,5,6,7,8,9,10
There’s 16 total articles written. sigh Now it’s faking the limit of 15 with the first five repeated.
Voice Actor – starting up a site for that good book stuff.
Offline
Re: Articles appearing despite 'article limit.'
Look at the tag trace
Offline
#5 2007-08-27 20:53:55
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Articles appearing despite 'article limit.'
It really looks as if you’ve got two article tags on the page, a similar thing happens on your category page. See if you can find something in the tag trace, or else post it here. EDIT: okay, Ruud already said that ;)
I can see a couple of things that should be changed, but they don’t seem related to your problem:- the
<txp:if_individual_article>...</txp:if_individual_article>part doesn’t belong inside theif_section name=""tags. Individual articles never are in section ‘default’. - second, your links to /about and /contact are clean urls and don’t work.
Last edited by els (2007-08-27 20:55:06)
Offline
#6 2007-08-27 22:20:04
- BryanA.
- Member

- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Re: Articles appearing despite 'article limit.'
This thing is a mile long and I think it’s cool! Anyhow, I hope it helps and that I cut out unimportant redundancy.
[SQL (0.000363): select name from txp_lang where lang=‘en-gb’ limit 1]
[SQL (0.003491): select name, data from txp_lang where lang=‘en-gb’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0.002737): select name, code, version from txp_plugin where status = 1]
[SQL (0.001718): select * from txp_section where name = ‘default’ limit 1]
[SQL (0.000830): select host from txp_log where ip=’___’ limit 1]
[SQL (0.002800): insert into txp_log set `time`=now(),page=’/’,ip=’___’,host=’___’,refer=’‘,status=‘200’,method=‘GET’]
[SQL (0.001258): select user_html from txp_page where name=‘default’]
[Page: default]
<txp:css/>
<txp:page_title/>
<txp:output_form form=“header” />
[SQL (0.000492): select Form from txp_form where name=‘header’]
[Form: header]
<txp:link_to_home>
</txp:link_to_home>
<txp:php>
</txp:php>
<txp:if_section name=”“>
[<txp:if_section name=”“>: true]
<txp:article limit=“5” />
[SQL (0.000682): select name from txp_section where on_frontpage != ‘1’]
[SQL (0.003906): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and Section != ‘about’ and Section != ‘contact’ and Section != ‘tag’]
[SQL (0.002055): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section != ‘about’ and Section != ‘contact’ and Section != ‘tag’ order by Posted desc limit 0, 5]
[article 15]
[SQL (0.000422): select Form from txp_form where name=‘default’]
[Form: default]
<txp:posted/>
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:category1 link=“y” />
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:if_excerpt>
[<txp:if_excerpt>: false]
<txp:body/>
<txp:image id=“22” />
[SQL (0.003069): select * from txp_image where id = 22 limit 1]
<txp:image id=“23” />
[SQL (0.000798): select * from txp_image where id = 23 limit 1]
</txp:if_excerpt>
</txp:if_article_list>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_invite/>
</txp:if_comments_allowed>
… and on until …
[article 11]
[Form: default]
<txp:posted/>
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:category1 link=“y” />
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:if_excerpt>
[<txp:if_excerpt>: false]
<txp:body/>
<txp:image id=“18” />
[SQL (0.000598): select * from txp_image where id = 18 limit 1]
</txp:if_excerpt>
</txp:if_article_list>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_invite/>
</txp:if_comments_allowed>
<txp:older>
</txp:older>
<txp:newer>
</txp:newer>
</txp:if_section>
<txp:if_section name=“about”>
[<txp:if_section name=“about”>: false]
</txp:if_section>
<txp:if_section name=“contact”>
[<txp:if_section name=“contact”>: false]
</txp:if_section>
<txp:if_section name=“tag”>
[<txp:if_section name=“tag”>: false]
<txp:article/>
[SQL (0.000924): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and Section != ‘about’ and Section != ‘contact’ and Section != ‘tag’]
[SQL (0.003632): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section != ‘about’ and Section != ‘contact’ and Section != ‘tag’ order by Posted desc limit 0, 10]
[article 15]
[Form: default]
<txp:posted/>
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:category1 link=“y” />
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:if_excerpt>
[<txp:if_excerpt>: false]
<txp:body/>
<txp:image id=“22” />
<txp:image id=“23” />
</txp:if_excerpt>
</txp:if_article_list>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_invite/>
</txp:if_comments_allowed>
…on and on and on until…
[article 6]
[Form: default]
<txp:posted/>
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:category1 link=“y” />
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:if_excerpt>
[<txp:if_excerpt>: false]
<txp:body/>
<txp:image id=“9” />
[SQL (0.000503): select * from txp_image where id = 9 limit 1]
</txp:if_excerpt>
</txp:if_article_list>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_invite/>
</txp:if_comments_allowed>
</txp:if_section>
<txp:output_form form=“sidebar” />
[SQL (0.000547): select Form from txp_form where name=‘sidebar’]
[Form: sidebar]
<txp:site_url/>
<txp:site_url/>
<txp:site_url/>
<txp:tru_tags_cloud wraptag=“ul” />
[SQL (0.000387): select name from txp_section where searchable != ‘1’]
[SQL (0.000860): select Keywords from textpattern where Keywords <> ‘‘and Section != ‘‘and Section != ‘contact’ and Section != ‘tag’ and Status >= ‘4’ and Posted < now()]
<txp:category_list break=“li” wraptag=“ul” />
[SQL (0.001017): select name, title from txp_category where type = ‘article’ and name not in(‘default’,‘root’) order by name ASC]
<txp:search_input label=”“ wraptag=“p” />
[SQL (0.000467): select form from txp_form where `name` = ‘search_input’ limit 1]
<txp:linklist break=“li” />
[SQL (0.004496): select *, unix_timestamp(date) as uDate from txp_link where 1 order by linksort asc ]
[SQL (0.000466): select Form from txp_form where name=‘plainlinks’]
[Form: plainlinks]
<txp:linkdesctitle/>
[Form: plainlinks]
<txp:linkdesctitle/>
[Form: plainlinks]
<txp:linkdesctitle/>
<txp:feed_link label=“RSS 0.92” section=“article” flavor=“rss” wraptag=“li” />
<txp:feed_link label=“Atom 1.0” section=“article” flavor=“atom” wraptag=“li” />
<txp:output_form form=“footer” />
[SQL (0.000786): select Form from txp_form where name=‘footer’]
[Form: footer]
[ ~~~ secondpass ~~~ ]
—>
Voice Actor – starting up a site for that good book stuff.
Offline
#7 2007-08-27 22:33:05
- BryanA.
- Member

- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Re: Articles appearing despite 'article limit.'
Els wrote:
I can see a couple of things that should be changed, but they don’t seem related to your problem:
- the
<txp:if_individual_article>...</txp:if_individual_article>part doesn’t belong inside theif_section name=""tags. Individual articles never are in section ‘default’.- second, your links to /about and /contact are clean urls and don’t work.
I switched the txp:older and :newer attributes (?) to a form per TXP RedTrain (you’ll see evidence of that since the word ‘trains’ is popping up).
Those clean URLs are defaulted that way and I just haven’t gotten around to them yet – my first battle was placing that nifty date. As long as things are goofy with the site, I’m not anxious to let folks know who I am yet! ;)
Currently:
<div id=“content”>
<txp:if_section name=”“>
<txp:article limit=“5” />
<txp:output_form form=“page_article_nav” />
</txp:if_section>
<txp:if_section name=“about”>
<txp:article limit=“1” form=“Single” />
</txp:if_section>
<txp:if_section name=“contact”>
<txp:article limit=“1” form=“Single” />
</txp:if_section>
</div>
Voice Actor – starting up a site for that good book stuff.
Offline
#8 2007-08-27 22:41:43
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Articles appearing despite 'article limit.'
BryanA. wrote:
<txp:if_section name="about">
[<txp:if_section name="about">: false]
</txp:if_section>
<txp:if_section name="contact">
[<txp:if_section name="contact">: false]
</txp:if_section>
<txp:if_section name="tag">
[<txp:if_section name="tag">: false]
<txp:article/>
[SQL (0.000924): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and Section != 'about' and Section != 'contact' and Section != 'tag']
[SQL (0.003632): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section != 'about' and Section != 'contact' and Section != 'tag' order by Posted desc limit 0, 10]
I think this is where it goes wrong. Apparently there is also an if_section name="tag" on the page that you didn’t mention in your first post. Can you check the code on your page again? What I don’t understand is why the article tag is still being executed while the condition is not met ([<txp:if_section name="tag">: false]).
Offline
#9 2007-08-28 00:16:32
- BryanA.
- Member

- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Re: Articles appearing despite 'article limit.'
Now I’m just baffled as hell. You’re right, the “tag” shouldn’t be there – it’s left over from the Tag Cloud experimenting. But the articles were supposed to reference the Page ‘archive’ and Style ‘default.’ The above shows that articles are referencing Page ‘default’ and Style ‘default.’
I copy/pasted Page ‘archive’ into Page ‘default’ (which I mangled anyway) and actually now have 5 articles showing properly. But I don’t know why, when setting Sections, Article page:archive style:default ignored me?
So while I was showing you all my hand-made ‘archive’ page which Section:article was supposed to look at, it’s been looking at ‘default’ the whole time staying unchanged. Now it just complains of a <txp:else/> error which is in the page_nav Form I made.
I don’t know what to say… I’m really grateful for your help without which I wouldn’t have noticed the Page switch which may or may not be a bug.
Voice Actor – starting up a site for that good book stuff.
Offline
#10 2007-08-28 14:59:38
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Articles appearing despite 'article limit.'
The front page uses section Default, so do category lists. Section lists and individual articles use their own section. So section Article is not used by the front page :)
Last edited by els (2007-08-28 15:02:03)
Offline
#11 2007-08-28 17:10:46
- BryanA.
- Member

- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Re: Articles appearing despite 'article limit.'
So I guess the lesson is that even when an entry is Sectioned ‘article’ by default and is allowed to appear on the front page, it won’t matter if ‘article’ is told to look at a customized page – the Front page will look at Default anyway.
I get it and it explains why my other efforts haven’t given me the same trouble; I’ve been messing around with Default rather than redirecting ‘article’ Sections. Big, big thanks!
Solved!
Voice Actor – starting up a site for that good book stuff.
Offline
#12 2007-08-28 22:24:47
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Articles appearing despite 'article limit.'
I’m glad your problem has been solved :) but the strange tag trace output keeps puzzling me… why would a query be executed despite the fact that the condition returns false…? (not a question directed to you, BryanA., I’m just hoping that someone who knows the answer will come along and read this)
Offline