Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-12 18:04:12

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

gbp_permanent_links: pagination

I am using older and newer tags on my website. It works fine on my portfolio page but not on my news page.

I am using the regular article tag on both pages and both are limited to 3 articles. there are more than 3 articles live.

article tag on both pages identical (except for form attribute):

<txp:article allowoverride=“0” form=“artikel-news” limit=“3” pgonly=“0” searchall=“0” searchsticky=“0” />

<ul class=“pagination”>
<li class=“older”><txp:older showalways=“1”>älter</txp:older></li>
<li class=“newer”><txp:newer showalways=“1”>neuer</txp:newer></li>
</ul>

the news page is a different section using a different page template. is paging only in default available? I don’t think so?? the first news page recognizes that there is more content and links to one older page but this page is empty and no newer link is available

thank you

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2008-01-16 11:45:40)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#2 2008-01-12 19:28:03

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

Re: gbp_permanent_links: pagination

It should work on all templates. But the older and newer tags only work with <txp:article />, are you sure you are not using <txp:article_custom /> on that other page?

Edit: I re-read your post and see you don’t. Could you post a tag trace?

Last edited by els (2008-01-12 19:33:03)

Offline

#3 2008-01-12 19:52:36

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: gbp_permanent_links: pagination

tag trace from that second news page. the page that does not show what it is supposed to.

<!-- txp tag trace: 
[SQL (0,000603): select name from txp_lang where lang='de-de' limit 1]
[SQL (0,006215): select name, data from txp_lang where lang='de-de' AND ( event='public' OR event='common')]
[SQL (0,007056): select name, code, version from txp_plugin where status = 1]
[SQL (0,000315): select name,code,version from txp_plugin where status = 1 AND name='gbp_admin_library']
[SQL (0,000320): select name, html as type from txp_prefs where event = 'permlinks' AND html <> 'gbp_partial']
[SQL (0,000153): select title from txp_section where name='neuigkeiten']
[SQL (0,000171): select * from txp_section where name = 'neuigkeiten' limit 1]
[SQL (0,000185): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=2 and Status = 4]
[SQL (0,000713): select REPLACE(name, 'gbp_permanent_links_', '') AS id from txp_prefs where `event` = 'permlinks' AND `name` REGEXP '^gbp_permanent_links_.{13}$']
[SQL (0,000131): select name from txp_section where (`name` like 'neuigkeiten' or `name` like 'neuigkeiten') limit 1]
[SQL (0,000130): select name from txp_category where (`name` like '2' or `name` like '2') and `type` = 'article' limit 1]
[SQL (0,000250): select ID from textpattern where `url_title` like '2' and `Section` = 'neuigkeiten' and `Status` >= 4 limit 1]
[SQL (0,000127): select name from txp_section where (`name` like 'neuigkeiten' or `name` like 'neuigkeiten') limit 1]
[SQL (0,000257): select ID, Posted from textpattern where (`url_title` like '2' or `url_title` like '2') and `Section` = 'neuigkeiten' and `Status` >= 4 limit 1]
[SQL (0,000116): select name from txp_section where (`name` like 'neuigkeiten' or `name` like 'neuigkeiten') limit 1]
[SQL (0,000242): select ID from textpattern where `url_title` like '2' and `Section` = 'neuigkeiten' and `Status` >= 4 limit 1]
[SQL (0,000287): select user_html from txp_page where name='suche_news']
[Seite: suche_news]
<txp:output_form form="head" />
	[SQL (0,002047): select Form from txp_form where name='head']
	[Baustein: head]
	<txp:ob1_title order="%article,%category,%section,%sitename" separator=", "/>
		[SQL (0,000145): select title from txp_section where name = 'neuigkeiten' limit 1]
		[SQL (0,000100): select category1, category2 from textpattern where id = '2' limit 1]
		[SQL (0,000088): select title from textpattern where id = '2' limit 1]
	<txp:keywords/>
	<txp:ob1_title order="%article,%category,%section,%sitename" separator=" - " />
		[SQL (0,000133): select title from txp_section where name = 'neuigkeiten' limit 1]
		[SQL (0,000090): select category1, category2 from textpattern where id = '2' limit 1]
		[SQL (0,000088): select title from textpattern where id = '2' limit 1]
	<txp:smd_slimbox_inc jsdir="/textpattern" cssdir="/textpattern" />
<txp:section/>
<txp:output_form form="navi" />
	[SQL (0,000129): select Form from txp_form where name='navi']
	[Baustein: navi]
	<txp:cbs_navigation_menu sections="leistungen,unternehmen,impressum" 
accesskeys="l,u,i"
titles="Leistungen,Unternehmen,Impressum" wraptag="ul" break="li" activenolink="true" />
<txp:section title="n" />
	[SQL (0,000120): select title from txp_section where name='neuigkeiten']
<txp:output_form form="subnavi" />
	[SQL (0,000143): select Form from txp_form where name='subnavi']
	[Baustein: subnavi]
	<txp:if_section name="leistungen">
		[<txp:if_section name="leistungen">: false]
	</txp:if_section>
	<txp:if_section name="unternehmen">
		[<txp:if_section name="unternehmen">: false]
	</txp:if_section>
	<txp:if_section name="impressum">
		[<txp:if_section name="impressum">: false]
	</txp:if_section>
	<txp:if_section name="default">
		[<txp:if_section name="default">: false]
	</txp:if_section>
	<txp:if_section name="suche">
		[<txp:if_section name="suche">: false]
		<txp:output_form form="search-input" />
			[SQL (0,000128): select Form from txp_form where name='search-input']
			[Baustein: search-input]
	</txp:if_section>
<txp:if_section name="neuigkeiten" >
	[<txp:if_section name="neuigkeiten" >: true]
	<txp:article allowoverride="0" form="artikel-news" limit="3" pgonly="0" searchall="0" searchsticky="0" />
		[SQL (0,000183): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 2 and Status = 4 limit 1]
	<txp:older showalways=“0”>
	</txp:older>
	<txp:newer showalways=“0”>
	</txp:newer>
</txp:if_section>
<txp:if_section name="suche" >
	[<txp:if_section name="suche" >: false]
</txp:if_section>
<txp:if_section name="uebersicht" >
	[<txp:if_section name="uebersicht" >: false]
</txp:if_section>
<txp:if_section name="login" >
	[<txp:if_section name="login" >: false]
</txp:if_section>
<txp:output_form form="meta" />
	[SQL (0,000163): select Form from txp_form where name='meta']
	[Baustein: meta]
	<txp:cbs_navigation_menu sections="uebersicht,suche,login" 
accesskeys="e,c,o"
titles="Übersicht, Suche, Login" wraptag="ul" break="li" activenolink="true" />
<txp:output_form form="autocomplete" />
	[SQL (0,000122): select Form from txp_form where name='autocomplete']
	[Baustein: autocomplete]
<txp:output_form form="google-analytics" />
	[SQL (0,000125): select Form from txp_form where name='google-analytics']
	[Baustein: google-analytics]
[ ~~~ secondpass ~~~ ]
 -->

(Edit: added bc. to show the code properly. -Els)

Last edited by els (2008-01-12 21:37:28)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#4 2008-01-12 20:17:40

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

Re: gbp_permanent_links: pagination

In your code you have:

<txp:older showalways=“0”>älter</txp:older>
<txp:newer showalways=“0”>neuer</txp:newer>

When it should be:

<txp:older showalways="1">älter</txp:older>
<txp:newer showalways="1">neuer</txp:newer>

So, fix the quotes (and possibly the value from zero also) – you have probably copied code somewhere and ended with wrong ones ;)

Cheers!

Offline

#5 2008-01-12 20:31:25

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: gbp_permanent_links: pagination

I have made the changes but still nothing … It would have surprised me since it works on my portfolio page with this syntax. you can have a look at the problem at http://www.visiongraphix.de/neuigkeiten/

at the bottom of the page you see the pagination links and after klicking you see that there will be no newer link


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#6 2008-01-12 20:52:22

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

Re: gbp_permanent_links: pagination

Are you using gbp_permanent_links ? as it seems so, because you’re using custom link style.

Your code outputs:

<a href="http://www.visiongraphix.de/neuigkeiten/2/">älter</a>

And it definitely won’t work. Also some other links are messed up, like the newer page link points to http://www.visiongraphix.de/neuigkeiten/neuigkeiten/2/

Althought they work with:

http://www.visiongraphix.de/neuigkeiten/?pg=2

That is the correct link style. So it’s gbp_permanent_links issue, or how it’s been set up.

Cheers!

Last edited by Gocom (2008-01-12 20:53:17)

Offline

#7 2008-01-12 21:06:57

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: gbp_permanent_links: pagination

I see I see … yes I am using gbp_permanent_links but I have created a rule for this section:

/section / page

plus pagination works fine at my frontpage …

Last edited by markusfalk (2008-01-12 21:07:11)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#8 2008-01-12 21:23:09

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

Re: gbp_permanent_links: pagination

But the problem is that it doesn’t work. And, yes it works at the frontpage, because there you don’t have that rule set.

Cheers!

Last edited by Gocom (2008-01-12 21:23:32)

Offline

#9 2008-01-12 21:29:14

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: gbp_permanent_links: pagination

the plugin uses a rule at my frontpage too. pagination links at my frontpage are also rewritten but working …


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#10 2008-01-12 21:51:58

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

Re: gbp_permanent_links: pagination

If it works on the front page, there is no reason why you wouldn’t be able to get it to work on a section page as well. But Gocom is right, http://www.visiongraphix.de/neuigkeiten/?pg=2 does work…

What I find a bit strange is this query from the tag trace:

[SQL (0,000183): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 2 and Status = 4 limit 1]

Where does the ID = 2 come from?? Can you have a look at the tag trace of http://www.visiongraphix.de/neuigkeiten/?pg=2, is that same query there as well or is it different?

Offline

#11 2008-01-12 22:01:23

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: gbp_permanent_links: pagination

tag trace from http://www.visiongraphix.de/neuigkeiten/?pg=2

seems like there is no id=2 but I’m not sure what that means. I don’t know where id=2 comes from. at first i thought maybe the missing article on page 2 has this id but that is not the case. maybe it is the page number

 txp tag trace: 
[SQL (0,000610): select name from txp_lang where lang='de-de' limit 1]
[SQL (0,006201): select name, data from txp_lang where lang='de-de' AND ( event='public' OR event='common')]
[SQL (0,002646): select name, code, version from txp_plugin where status = 1]
[SQL (0,000422): select name,code,version from txp_plugin where status = 1 AND name='gbp_admin_library']
[SQL (0,000339): select name, html as type from txp_prefs where event = 'permlinks' AND html <> 'gbp_partial']
[SQL (0,000286): select title from txp_section where name='neuigkeiten']
[SQL (0,000172): select name from txp_section where `name` like 'neuigkeiten' limit 1]
[SQL (0,000162): select * from txp_section where name = 'neuigkeiten' limit 1]
[SQL (0,000871): select REPLACE(name, 'gbp_permanent_links_', '') AS id from txp_prefs where `event` = 'permlinks' AND `name` REGEXP '^gbp_permanent_links_.{13}$']
[SQL (0,000210): select name from txp_section where (`name` like 'neuigkeiten' or `name` like '') limit 1]
[SQL (0,000161): select name from txp_section where (`name` like 'neuigkeiten' or `name` like '') limit 1]
[SQL (0,000161): select name from txp_section where (`name` like 'neuigkeiten' or `name` like '') limit 1]
[SQL (0,000155): select name from txp_section where (`name` like 'neuigkeiten' or `name` like '') limit 1]
[SQL (0,000368): select user_html from txp_page where name='suche_news']
[Seite: suche_news]
<txp:output_form form="head" />
	[SQL (0,000178): select Form from txp_form where name='head']
	[Baustein: head]
	<txp:ob1_title order="%article,%category,%section,%sitename" separator=", "/>
		[SQL (0,000121): select title from txp_section where name = 'neuigkeiten' limit 1]
		[SQL (0,000103): select title from txp_category where name = '' limit 1]
	<txp:keywords/>
	<txp:ob1_title order="%article,%category,%section,%sitename" separator=" - " />
		[SQL (0,000155): select title from txp_section where name = 'neuigkeiten' limit 1]
		[SQL (0,000099): select title from txp_category where name = '' limit 1]
	<txp:smd_slimbox_inc jsdir="/textpattern" cssdir="/textpattern" />
<txp:section/>
<txp:output_form form="navi" />
	[SQL (0,000130): select Form from txp_form where name='navi']
	[Baustein: navi]
	<txp:cbs_navigation_menu sections="leistungen,unternehmen,impressum" 
accesskeys="l,u,i"
titles="Leistungen,Unternehmen,Impressum" wraptag="ul" break="li" activenolink="true" />
<txp:section title="n" />
	[SQL (0,000129): select title from txp_section where name='neuigkeiten']
<txp:output_form form="subnavi" />
	[SQL (0,000131): select Form from txp_form where name='subnavi']
	[Baustein: subnavi]
	<txp:if_section name="leistungen">
		[<txp:if_section name="leistungen">: false]
	</txp:if_section>
	<txp:if_section name="unternehmen">
		[<txp:if_section name="unternehmen">: false]
	</txp:if_section>
	<txp:if_section name="impressum">
		[<txp:if_section name="impressum">: false]
	</txp:if_section>
	<txp:if_section name="default">
		[<txp:if_section name="default">: false]
	</txp:if_section>
	<txp:if_section name="suche">
		[<txp:if_section name="suche">: false]
		<txp:output_form form="search-input" />
			[SQL (0,000224): select Form from txp_form where name='search-input']
			[Baustein: search-input]
	</txp:if_section>
<txp:if_section name="neuigkeiten" >
	[<txp:if_section name="neuigkeiten" >: true]
	<txp:article allowoverride="0" form="artikel-news" limit="3" pgonly="0" searchall="0" searchsticky="0" />
		[SQL (0,000342): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and Section = 'neuigkeiten']
		[SQL (0,000438): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section = 'neuigkeiten' order by Posted desc limit 3, 3]
		[SQL (0,000120): select Form from txp_form where name='artikel-news']
		[Baustein: artikel-news]
		[Artikel 52]
		<txp:article_id/>
		<txp:title/>
		<txp:ras_if_article_image>
			[<txp:ras_if_article_image>: true]
			<txp:article_image class="article-image" />
				[SQL (0,000238): select * from txp_image where id = 54]
		</txp:ras_if_article_image>
		<txp:body/>
		<txp:posted/>
	<txp:older showalways="1">
	</txp:older>
	<txp:newer showalways="1">
	</txp:newer>
</txp:if_section>
<txp:if_section name="suche" >
	[<txp:if_section name="suche" >: false]
</txp:if_section>
<txp:if_section name="uebersicht" >
	[<txp:if_section name="uebersicht" >: false]
</txp:if_section>
<txp:if_section name="login" >
	[<txp:if_section name="login" >: false]
</txp:if_section>
<txp:output_form form="meta" />
	[SQL (0,000182): select Form from txp_form where name='meta']
	[Baustein: meta]
	<txp:cbs_navigation_menu sections="uebersicht,suche,login" 
accesskeys="e,c,o"
titles="Übersicht, Suche, Login" wraptag="ul" break="li" activenolink="true" />
<txp:output_form form="autocomplete" />
	[SQL (0,000207): select Form from txp_form where name='autocomplete']
	[Baustein: autocomplete]
<txp:output_form form="google-analytics" />
	[SQL (0,000117): select Form from txp_form where name='google-analytics']
	[Baustein: google-analytics]
[ ~~~ secondpass ~~~ ]

Last edited by markusfalk (2008-01-12 22:03:00)


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#12 2008-01-13 23:18:07

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

Re: gbp_permanent_links: pagination

Markus, I’m lost… The id=2 in the query is obviously messing things up, but I honestly don’t know why it is there. It still might have something to do with gbp_permanent_links, but I’m not sure, since the problem does not occur on the front page.

So, I am going to move this thread to Troubleshooting, hoping that someone else can interpret the tag trace better than I can…

Offline

Board footer

Powered by FluxBB