Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-06-30 13:15:28
- moggie
- Member
- Registered: 2008-06-27
- Posts: 11
Empty section front pages
Hi,
I just noticed today that one of my sections called ‘projects’ will display the ‘older’ link at the bottom of the page, which when clicked, will show the next page and display older articles in the ‘projects’ section as normal.
However, for some reason, it will keep showing the ‘older’ link when there are no more articles to display, and go on to display about 7 other blank pages as if it thinks there are more articles to display.
I was wondering if anyone else had experienced this before?
Thank you in advance for your time and consideration.
Regards,
Moggie.
Offline
#2 2008-06-30 14:50:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Empty section front pages
Can you post the tag trace (see bottom of this FAQ) of such an empty page (with an ‘older’ link)?
Offline
#3 2008-06-30 16:11:10
- moggie
- Member
- Registered: 2008-06-27
- Posts: 11
Re: Empty section front pages
Hi,
Thank you for getting back to me. Please find the tag trace below:
<!-- Runtime: 0.0296 -->
<!-- Query time: 0.017329 -->
<!-- Queries: 17 -->
<!-- Memory: 3329Kb, <txp:php> include($_SERVER['DOCUMENT_ROOT']. '/inc/footer.inc'); </txp:php> -->
<!-- txp tag trace:
[SQL (0.005283): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.000705): select name, code, version from txp_plugin where status = 1]
[SQL (0.000554): select name from txp_section where `name` like 'projects' limit 1]
[SQL (0.000297): select * from txp_section where name = 'projects' limit 1]
[SQL (0.000807): select host from txp_log where ip='213.107.20.212' limit 1]
[SQL (0.000479): insert into txp_log set `time`=now(),page='/projects/?pg=3',ip='213.107.20.212',host='cpc2-nfds5-0-0-cust211.lei3.cable.ntl.com',refer='',status='200',method='GET']
[SQL (0.000624): select user_html from txp_page where name='gen_pages']
[Page: gen_pages]
<txp:page_title/>
[SQL (0.000263): select title from txp_section where name='projects']
<txp:feed_link flavor="atom" format="link" label="Atom" />
<txp:feed_link flavor="rss" format="link" label="RSS" />
<txp:php>
</txp:php>
<txp:article form="article_excerpt" limit="1" listform="article_excerpt" pgonly="0" />
[SQL (0.001014): select count(*) from textpattern where 1=1 and Status = 4 and Posted <= now() and Section IN ('projects')]
[SQL (0.001127): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and Section IN ('projects') order by Posted desc limit 2, 1]
[article 12]
[SQL (0.000489): select Form from txp_form where name='article_excerpt']
[Form: article_excerpt]
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:section title="1" />
</txp:if_article_list>
<txp:glx_if_section_frontpage>
[<txp:glx_if_section_frontpage>: true]
<txp:section title="1" />
</txp:glx_if_section_frontpage>
<txp:if_search>
[<txp:if_search>: false]
</txp:if_search>
<txp:article limit="5" />
[SQL (0.000643): select count(*) from textpattern where 1=1 and Status = 4 and Posted <= now() and Section IN ('projects')]
[SQL (0.000994): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and Section IN ('projects') order by Posted desc limit 10, 5]
<txp:if_individual_article>
[<txp:if_individual_article>: false]
<txp:older>
<txp:text item="older" />
</txp:older>
<txp:newer>
<txp:text item="newer" />
</txp:newer>
</txp:if_individual_article>
<txp:php>
</txp:php>
<txp:if_individual_article>
[<txp:if_individual_article>: false]
<txp:recent_articles break="li" label="Recent Articles" labeltag="h4" limit="5" sort="LastMod desc" wraptag="ul" />
[SQL (0.001732): select *, id as thisid, unix_timestamp(Posted) as posted from textpattern where Status = 4 and Posted <= now() order by LastMod desc limit 0,5]
</txp:if_individual_article>
<txp:search_input wraptag="p" />
[SQL (0.000255): select form from txp_form where `name` = 'search_input' limit 1]
<txp:popup type="c" wraptag="p" />
[SQL (0.000614): select name, title from txp_category where type = 'article' and name != 'root' order by name]
<txp:feed_link label="RSS" />
<txp:feed_link flavor="atom" label="Atom" />
<txp:php>
</txp:php>
<txp:php>
</txp:php>
[ ~~~ secondpass ~~~ ]
-->
I tried disabling both the plugins I am using (chh_if_data and glx_if) but it didn’t seem to make the problem go away. Again, thank you for your time and consideration.
Regards,
Moggie
Offline
#4 2008-06-30 18:26:13
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Empty section front pages
You have two article tags on the page:
<txp:article form="article_excerpt" limit="1" listform="article_excerpt" pgonly="0" />
and <txp:article limit="5" />
.
The second one doesn’t return any articles, but the first one displays article #12. So that might explain why the older link still works.
Last edited by els (2008-06-30 18:27:58)
Offline
#5 2008-06-30 21:12:49
- moggie
- Member
- Registered: 2008-06-27
- Posts: 11
Re: Empty section front pages
Els wrote:
You have two article tags on the page:
<txp:article form="article_excerpt" limit="1" listform="article_excerpt" pgonly="0" />
and<txp:article limit="5" />
.
The second one doesn’t return any articles, but the first one displays article #12. So that might explain why the older link still works.
Thank you so much for looking into that for me, it was all a mystery to me. I clicked through the rest of the pages, and it displays articles numbered 12 (as you said), 10, 8, 7 and 6. These are all other articles in the ‘projects’ section as I added them.
There must be something funky going on with the first article tag picking up an excerpt or something, I guess, just need to figure out what. Thanks again :)
Kind regards,
Moggie.
Offline
#6 2008-06-30 21:19:55
- moggie
- Member
- Registered: 2008-06-27
- Posts: 11
Re: Empty section front pages
I think I fixed it. I needed to place the first article tag into a <txp:else /> tag, so it would only be displayed when not showing a section front page. The extra blank pages with the ‘older’ links now no longer appear. Thanks again for your help!
Kind regards,
Moggie
Offline
Pages: 1