Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-28 19:43:28

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

previous/next button in "Write tab" aren't working as expected.

Hi,
I have been looking if this has been reported before, but it doesnt seem to.

When in “Write tab”, I’m using the Previous/Next to navigate the articles, but those buttons jump over some articles.

Suppose I’m in article with ID=22. The next button points to ID=25 (incorrect) and the previous to ID=21 (correct).
Sometimes, the incorrect link is in the previous button, sometimes in the next button, but I think never in both at the same time.

At first, I thought it was related with articles that has no content in the body, but now i’m not sure about that.

Is this a bug?

Last edited by maniqui (2006-03-28 19:43:47)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#2 2006-03-28 20:23:53

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: previous/next button in "Write tab" aren't working as expected.

It sorts by date rather than ID, so the articles should be displayed in the order of their post dates. Does that match what you’re seeing?

-Kurt

Last edited by KurtRaschke (2006-03-28 20:27:40)


kurt@kurtraschke.com

Offline

#3 2006-03-28 21:13:47

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: previous/next button in "Write tab" aren't working as expected.

Hi KurtRaschke

I’m talking about the previous/next in the “Write” tab, not in the “Articles” tab.

In the “Write” tab, I cant navigate all the articles with those previous/next button.
There are some articles that seem to be missing, because I start browsing in the article with ID=1 and finish in the article with ID=36, but in the middle, there are some articles that are missing :(
And I cant find the reason!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2006-03-28 21:18:11

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: previous/next button in "Write tab" aren't working as expected.

Yes, I was referring to the buttons on the ‘write’ tab—they are previous and next by date, not by ID. Do all of the articles from 1 to 36 show up on the ‘articles’ tab in the proper order?

-Kurt


kurt@kurtraschke.com

Offline

#5 2006-03-28 22:00:15

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: previous/next button in "Write tab" aren't working as expected.

In the “Articles” tab they are showing by date (all the articles have been writing on the same day, ‘cause they are products of a small company).

In that tab, if I look at the status bar while pointing to each article title with the mouse, I can conclude that the articles arent propered order by ID (and in this case, order by ID and order by Date should be exactly the same, because I havent being playing with the dates).
If I point with the mouse, I can see an order like: 26, 27, 28, 30, 29, 31…

And I think that “disorder” matchs exactly with the problem in the “Write” tab.

Example: if I’m looking at the article ID=30 (in Write tab), I can go to 28 with the previous link, and to 31 with the next link.
But there is no way to get to the article ID=29 by using those buttons, in any way.

This happen with more than one article/ID.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2006-03-28 22:28:29

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: previous/next button in "Write tab" aren't working as expected.

Do any of your articles by any chance have the exact same timestamps?

If so, could you change them to be unique (say, +/- 1 minute), and see if that changes things?

-Kurt


kurt@kurtraschke.com

Offline

#7 2006-03-28 23:47:23

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: previous/next button in "Write tab" aren't working as expected.

Yes, that is very probably, because I have write them one after the other, so each one got a similar (if not the exact same) time stamps of the previous one.

I will check that and come back here.
Thanks for your help, Kurt.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2006-03-28 23:53:33

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: previous/next button in "Write tab" aren't working as expected.

Thanks Kurt, that was the problem: exact same timestamp.

I fixed by resaving my articles with different timestamps.

(still I think it’s some kind of little bug…)

Last edited by maniqui (2006-03-28 23:53:55)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#9 2006-03-28 23:58:02

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: previous/next button in "Write tab" aren't working as expected.

I would agree that it’s a bug. It’s exacerbated by the fact that by default TXP doesn’t store timestamps with seconds, thus increasing the chances of a collision. It also affects <txp:link_to_prev /> and <txp:link_to_next /> in the frontend.

I did produce a patch but I don’t know if it applies cleanly to the latest revision.

-Kurt

Last edited by KurtRaschke (2006-03-29 00:03:34)


kurt@kurtraschke.com

Offline

#10 2006-03-29 00:27:10

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: previous/next button in "Write tab" aren't working as expected.

This happens because when you sort, if there’s no secondary sorting mechanism (you can have a few), it’s up to your database to determine sort order after the first sort. Typically, sorting by date is good enough, so that’s why a secondary one wasn’t defined.

What should the secondary sort be? article id? article title?

Offline

#11 2006-03-29 01:06:39

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: previous/next button in "Write tab" aren't working as expected.

Article ID, I suppose. But really, anything would be better than the present state, as it’s not exactly intuitive, and leads users to think that content is disappearing.

-Kurt


kurt@kurtraschke.com

Offline

#12 2006-03-29 01:18:09

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: previous/next button in "Write tab" aren't working as expected.

KurtRaschke wrote:

Article ID, I suppose. But really, anything would be better than the present state, as it’s not exactly intuitive, and leads users to think that content is disappearing.

That is what I (an experienced user) thought for less than a nanosecond.

If I navigate from the first article to the last one by using those previous/next buttons in “Write” tab, and some articles dont show up I would conclude:
- there is a bug
- the articles disappeared (so, there is a bug).
But the articles didnt disappeared, so, there is a bug with those exact same timestamps.
If possible, I would go for adding the “seconds” in the time, but also for hiding them from the user. I think no one wants to know the exact second when the article was posted, and too much numbers can be confusing.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB