Kunena-Forum icon indicating copy to clipboard operation
Kunena-Forum copied to clipboard

pagination not working in link send to email

Open taoufiqaitali opened this issue 8 years ago • 20 comments

Steps to reproduce the issue

there is an issue in pagination with old kunena reply links that send to user by email, the pagination not work, it always show the page where the reply in issue is here whene the http://www.expandframework.com/forum.html?view=topic&defaultmenu=149&catid=6&id=4533&mesid=10139&layout=default&start=24 mesid is montioned in url, the start parameter egnored

Expected result

Actual result

System information (as much as possible)

Joomla version: 3.6.4 Kunena version:5.0.3 Php version:7.0.12 Database version:5.1.72-community

Additional comments

taoufiqaitali avatar Oct 26 '16 14:10 taoufiqaitali

Your urls are not correct.

Please recreate menu items,

810 avatar Oct 26 '16 16:10 810

Hi this url i get in mail, and pagination not work on it http://www.expandframework.com/forum/6-bugs/4533-non-admin-users-are-not-able-to-customize-layouts/10139.html

taoufiqaitali avatar Oct 27 '16 11:10 taoufiqaitali

when i click on the url, i see the correct message.

Else try to disable the joomlasef for kunena

810 avatar Oct 27 '16 21:10 810

I will try to explain a bit better the situation here. b4 3.x upgrade the site notified user by email for every post. These mails contained link like this http://www.expandframework.com/forum/6-bugs/4533-non-admin-users-are-not-able-to-customize-layouts/10139.html. For our users it is a common practice to bookmark these links. After the upgrade it is not possible to move to the next page. For example the previous link will navigate you to the 4th page of the thread and using the pager is not possible to navigate to other pages

image

p.s. i already disabled the joomlasef but has no effect in this case

apobekiaris avatar Oct 28 '16 05:10 apobekiaris

I'm not sure what your problem is. Also I haven't tried to reproduce it.

But a few days ago I had a similar problem and it was fixed with this: https://github.com/Kunena/Kunena-Forum/pull/4866/files

sshcli avatar Oct 28 '16 14:10 sshcli

@810 please check @apobekiaris reply it is explanation to issue we have with pagination

taoufiqaitali avatar Oct 28 '16 16:10 taoufiqaitali

will check it this weekend, first fixing some other bugs

810 avatar Oct 28 '16 19:10 810

Hello,

Any updates on this please?

On Fri, Oct 28, 2016 at 10:43 PM, Jelle Kok [email protected] wrote:

will check it this weekend, first fixing some other bugs

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kunena/Kunena-Forum/issues/4877#issuecomment-257010874, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJu6DA8R8REcSffgXw1b7P7u-rPrr90ks5q4lBxgaJpZM4KhOHn .

Apostolis Bekiaris Frameworks Technical Evangelist @ DevExpress Blog @ http://apobekiaris.blogspot.com Skype/twitter: tolisss

apobekiaris avatar Nov 02 '16 13:11 apobekiaris

could you give some extra info: like sef options on joomla, and Support Legacy URLs from kunena

i see you also have't page on the message link. : http://www.expandframework.com/forum/6-bugs/4533-non-admin-users-are-not-able-to-customize-layouts.html#10133 I can't reproduce that

810 avatar Nov 02 '16 13:11 810

Legacy Urls are set back to version 1.x and forum reports that I am using it since 1.5.12. The issue is there even if I disable the sef component.

i see you also have't page on the message link. : http://www.expandframework.com/forum/6-bugs/4533-non-admin-users-are-not-able-to-customize-layouts.html#10133

I am not sure what you telling us here but can you please read my explanation 5 days ago? there u will see this link http://www.expandframework.com/forum/6-bugs/4533-non-admin-users-are-not-able-to-customize-layouts/10139.html. When u click it takes you to page 4 and you cannot navigate to other pages, Such links the forum used to send before we upgrade from 2.5.x to 3.x

apobekiaris avatar Nov 02 '16 13:11 apobekiaris

Thats the point, there should not be any /10139.html at all.

This is bad for seo and its not working

should be: http://www.expandframework.com/forum/6-bugs/4533-non-admin-users-are-not-able-to-customize-layouts.html?start=18#10133

csdc

you should see this link on the message. top right when you see the message id with a link .

see my demo site: https://newf1.nl/forum/welcome-mat/7259-cb.html?start=18#610 for correct link

810 avatar Nov 02 '16 13:11 810

Actually @810 the link should be just like what it is. Its permalink to the given message and always pointing to that one.

The issue we had with the regular links is that the link forum uses is different depending if you're quest, user or moderator. The link also gets wrong after moderation operations, for example after you merged 2 topics together. So basically when users hit a popular and moderated topic, they were shown wrong page. Link in the email was also wrong always when moderator replied to the topic as moderators see more messages than normal users. Same is true if you want to link message to the forum -- permalinks were used to point message, not the topic where the page can change between two users.

Because of this, I had to create permalinks, which are basically links that always point to the message and when you click on them, they will be redirected to the correct page that Kunena uses internally for that given user.

mahagr avatar Nov 02 '16 18:11 mahagr

@mahagr so we need to change: $this->message->getUrl() to $this->message->getPermaUrl() ?

810 avatar Nov 02 '16 20:11 810

I think there's something else going on which has broken the pagination here. Kunena pagination class used to have parameter which allowed another url to be selected instead of the one that was currently being used by the browser. Maybe that's broken now?

Basically the idea was to use normal url for the message internally, but to switch to permalink whenever there was a change that the link could be used by different user than the current one or the url was stored to be used later. Permalink also used to work even after you moved a message to another topic, so its really handy to have for multiple reasons.

The only reason why we don't use permalinks internally is that they point directly to message and that doesn't really work with pagination. I think permalinks were also used inside search etc as it saves database query to figure out in which page we are in and thus making those pages where we do not have pagination information tenfold faster to render.

mahagr avatar Nov 03 '16 07:11 mahagr

I also remember that we put rel="nofollow" to permalinks and used canonical url inside that page to point out the real url.

mahagr avatar Nov 03 '16 07:11 mahagr

No updates in a year?

stutteringp0et avatar Feb 23 '18 16:02 stutteringp0et

i think kunena 5.1 will solve this issue, can you try if its working?

also please add url, so i can check it, and test some more.

810 avatar Feb 23 '18 16:02 810

temporary fix for me is to fix the link before it's rendered in layouts/widget/pagination/item/default.php

preg_replace('//[0-9]+?(?=(start|limitstart))/','?',$item->link)

Of course, this only works for SEF urls

stutteringp0et avatar Feb 23 '18 16:02 stutteringp0et

I'll look at 5.1

stutteringp0et avatar Feb 23 '18 16:02 stutteringp0et

This issue is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Oct 14 '19 19:10 github-actions[bot]