Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-01-25 15:20:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

link_to_next/prev in latest 4.8beta+

I seem to be having trouble with the link_to_next and link_to_prev tags in the latest dev version. The error returned reads

Notice: Undefined index: prev while parsing form None on page Blog

The article is not calling for a form as its content is contained within the wrapped article tag. I deleted all presentational elements and tried the code below.

<txp:if_individual_article>
	<txp:article status="live" form="">
		<h1><txp:title /></h1>
		<txp:body />
		<txp:variable name="prev1" value='<txp:link_to_prev />' />
			<txp:if_variable name="prev1" value="">
			<txp:else />
			<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
			</txp:if_variable>
		<txp:variable name="next1" value='<txp:link_to_next />' />
			<txp:if_variable name="next1" value="">
			<txp:else />
			<txp:link_to_next><txp:next_title /></txp:link_to_next>
			</txp:if_variable>
	</txp:article>
</txp:if_individual_article>

>Edited to add that creating a form and changing it to <txp:article status="live" form="my_form" /> also returns no links_to_xx.

Another edit to say that I have also created a new simple test page with the code above and a new section at the demo site.

The errors there are

Tag error: <txp:prev_title /> -> Textpattern Error: Incorrect parameter count in the call to native function 'FROM_UNIXTIME' while parsing form None on page test.

The same goes for next_title

Last edit:) I know that I may be the one doing something wrong as the links work fine in the default templates. Nevertheless the code above was working OK for me in txp4.7.3. Has something changed?

Last edited by colak (2020-01-25 16:47:29)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#2 2020-01-25 16:39:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: link_to_next/prev in latest 4.8beta+

Hmmm, something does seem to be going on there, but I’m not quite sure what. Perhaps the next/prev entries not being set after getNeighbour() returns due to the end of the list in either direction?

Might be to do with this commit from a few days ago, but it’s above my pay grade unless I sit down and figure out what’s going on; and I’m just heading out.

Hopefully Oleg will drop in and see this, as it’s probably a two-minute diagnosis for him!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2020-01-25 17:22:42

etc
Developer
Registered: 2010-11-11
Posts: 3,873
Website

Re: link_to_next/prev in latest 4.8beta+

Guilty sorry!

Offline

#4 2020-01-25 18:14:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

Re: link_to_next/prev in latest 4.8beta+

Yep! that’s corrected it.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#5 2020-01-26 19:10:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

Re: link_to_next/prev in latest 4.8beta+

Sorry guys… I’m now experiencing a new issue but I’m not sure if it is because of my site’s structure.

Before I attempt my description, note that I only have these tags in the blog section of the site. The code used is basically the same as the one posted above.

Here’s the description

  1. Viewing the latest article in the section, the link_to_prev appears
  2. Clicking on the link, the loaded page only shows link_to_prev but no link_to_next.
  3. Clicking on that, the third oldest post it starts behaving by displaying both link_to_prev and link_to_next as expected.

There appears to be no such issue on the live site running on txp4.7.3 on which the expected behaviour can be tested starting from here.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#6 2020-01-26 19:54:56

etc
Developer
Registered: 2010-11-11
Posts: 3,873
Website

Re: link_to_next/prev in latest 4.8beta+

Yiannis, are you testing the same data as on the live site? Could it be that two latest articles have identical sort values?

Offline

#7 2020-01-27 06:04:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

Re: link_to_next/prev in latest 4.8beta+

Hi Oleg,
In the blog section all the articles are the same as in the live site. I will be afk until this afternoon, at which time I can check the article list for duplicated dates/times.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#8 2020-01-27 11:19:24

etc
Developer
Registered: 2010-11-11
Posts: 3,873
Website

Re: link_to_next/prev in latest 4.8beta+

colak wrote #321358:

`hi Oleg,
In the blog section all the articles are the same as in the live site. I will be afk until this afternoon, at which time I can check the article list for duplicated dates/times.

Hi Yiannis, 4.8beta.2 release is suspended to your testing :-) Also check please whether sticky status is somehow involved.

Offline

#9 2020-01-27 14:46:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,270
Website

Re: link_to_next/prev in latest 4.8beta+

HI, Just came back. I sorted the articles by date posted and I am omitting author and modified here as I assume that they are not relevant

2226 Children of Prometheus 20 Dec 2019 20:26:29 Projects Live
2229 The Idea of the Avant Garde-And What It Means Today 2 19 Dec 2019 12:16:56 Blog Live
2228 Respublika! publication review 19 Nov 2019 10:57:03 Blog Live
2227 1s and 0s, haves and have-nots 11 Nov 2019 12:07:35 Projects Live
2225 Jonas Lund and Elisa Lasowski 26 Oct 2019 07:41:21 Blog Live
2223 Through Other Eyes 15 Oct 2019 09:42:40 Projects Live
2222 Children of Prometheus 26 Sep 2019 09:53:51 Blog Live

The problem is resolved on id 2225

>Edited to say. Do let me know if you would like access to the dev site.

Last edited by colak (2020-01-27 14:50:24)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#10 2020-01-27 15:19:15

etc
Developer
Registered: 2010-11-11
Posts: 3,873
Website

Re: link_to_next/prev in latest 4.8beta+

colak wrote #321363:

Do let me know if you would like access to the dev site.

Yes, this would help, thanks.

Offline

Board footer

Powered by FluxBB