• Home
  • Get help
  • Ask a question
Last post 10 hours 36 min ago
Posts last week 82
Average response time last week 34 min
All time posts 68071
All time tickets 10515
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#4316 – k2, k2 plugin and pagination issue with sh404sef

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Wednesday, 15 November 2017 03:40 UTC
daclina
Hi there,

I am having some issue with sh404sef, the k2 plugin and pagination. I'm using the latest v4.11.0.3643 of sh404sef, the v1 of the k2 plugin with Joomla 3.8.1.

With the k2 sh404sef plugin disabled, pagination URLs are do not contain page numbers (just start at article x, which I do not want) and the article URL's contain the IDs (which I do not want). If I enable the K2 plugin, the article URLs work nicely, but the pagination is broken. Take a look here (hover over the pagination numbers):

http://www.xxxx.com/watch-brand-reviews

The only pages I can get to are 1 2 and 9. I have purged all URLs and regenerated all menu items multiple times, but this hasn't changed.

I have logged this with the k2 team, but they insist that this is a known issue with sh404sef and that they do not overwrite joomla pagination, hence it must be something with sh404sef.

Can you assist please?

Thank you.
Wednesday, 15 November 2017 10:28 UTC
wb_weeblr
Hi

this is a known issue with sh404sef
It is not a known issue with sh404SEF. There is no known issue with sh404SEF, that has not been fixed at least in the dev version. There is no known issue with any kind of pagination. That just does not exist, because contrary to K2, sh404SEF and wbAMP are our only jobs, we are on it 100%.

1 - The first thing you need to do is:

a - switch to the protostar template
b - purge again URLs
c - load the home page and navigate

2 - Looking at http://www.xxxx.com/watch-brand-reviews, I can see the following: page links from 1 to 6 have the /page-1 suffix, while pages 7 and up have the /page-2 suffix.

This means that number of items per page are not handled/set properly I think.

Which non-sef URL are recorded in the URL manager for page-1 and page-2? Are there any duplicates listed for them in the Duplicates column? if so, which ones?

Rgds
 
Friday, 17 November 2017 08:34 UTC
daclina
Hi,

I was just paraphrasing what I was I told by the k2 plugin support team :)

What I did was open the site with ?template=protostar, but I had no menu loading as I have nothing assigned to the menu position. Content loads fine though.

You are onto the right track though:

page-1 has 3 duplicates

index.php?option=com_k2&Itemid=137&id=2&lang=en&layout=category&limitstart=4&task=category&view=itemlist (default)
index.php?option=com_k2&Itemid=137&id=2&lang=en&layout=category&limitstart=8&task=category&view=itemlist
index.php?option=com_k2&Itemid=137&id=2&lang=en&layout=category&limitstart=12&task=category&view=itemlist
index.php?option=com_k2&Itemid=137&id=2&lang=en&layout=category&limitstart=16&task=category&view=itemlist

page-2 has 4 duplicates

index.php?option=com_k2&Itemid=130&id=3&lang=en&limitstart=20&task=category&view=itemlist (default)
index.php?option=com_k2&Itemid=130&id=3&lang=en&limitstart=24&task=category&view=itemlist
index.php?option=com_k2&Itemid=130&id=3&lang=en&limitstart=28&task=category&view=itemlist
index.php?option=com_k2&Itemid=130&id=3&lang=en&limitstart=32&task=category&view=itemlist
index.php?option=com_k2&Itemid=130&id=3&lang=en&limitstart=36&task=category&view=itemlist

No idea why this automatically generates so many duplicates.

A bit more information on the issue if it matters. The menu items are links to single k2 categories (ie watch-brand-reviews). As such the number of items per page is defined in the category, not in the menu (menu needs more than 1 category to even activate the number of items per page as an option).

This is a recent thing, it worked quite well and suddenly this happened a few weeks (2-4 weeks) ago.

However:

http://www.xxxx.com/watch-brand-reviews?template=protostar

All pagination works correctly. If you remove the template switch parameter then pagination is messed up again. I am not sure why and how to fix this. From what I can see there are no pagination overrides in the Cepon template I use. Could it be T3 framework issue?

Any suggestions where to next?

Thanks
Hristo
Friday, 17 November 2017 10:00 UTC
wb_weeblr
Hi

A bit more information on the issue if it matters. The menu items are links to single k2 categories (ie watch-brand-reviews). As such the number of items per page is defined in the category, not in the menu (menu needs more than 1 category to even activate the number of items per page as an option).
I don't think that's the problem, this is internal to K2.

As you can see in the duplicates list, the &limitstart=xxx bits are the part that should trigger the page-x URL construction. But here they are all grouped under the same URL, ie the same page-1 SEF URL is used for the non-sef url of page 1 but also page 2, etc

All pagination works correctly. If you remove the template switch parameter then pagination is messed up again. I am not sure why and how to fix this
Unfortunately yes, it means the template is overriding the pagination class in Joomla. I don't know whether the override is in T3 or the template files itself, but this is confirmed by the fact that the non-sef URLs are missing one parameter: they should also have a &limit=xx on top of the &limitstart=yy bit.

sh404SEF is overriding the standard Joomla pagination class to be sure the &limit part is added. If another extension is overriding it differently, then they do not add the &limit=xx part, sh404SEF does not know how many items per page there are, and the page number calculation are off.

I would suggest you talk to the Template makers / T3 and ask if an update in the recent weeks or months have been made to that part. Note that it can be update that happened some times ago. Such problem would only appear for pages created after the update. Pre-existing pages can have a valid pagination, as URLs are stored in the DB once created.

Rgds
 
Saturday, 02 December 2017 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.