Keyword

Joomla 3.10.17 LTS destroys k2 pagination

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
6 months 4 days ago #181723 by Kostas Stathopoulos
Joomla 3.10.17 LTS destroys k2 pagination was created by Kostas Stathopoulos
Joomla 3.10.17 LTS shipped a fix that changes how Joomla creates the pagination links. The change destroys k2 pagination
3.10.18 LTS release (next tuesday) will add an option to restore the old behavior but the fixed issue (a cache poisoning attack) is re-introduced.

Please Log in or Create an account to join the conversation.

More
6 months 3 days ago #181724 by eugen
Replied by eugen on topic Joomla 3.10.17 LTS destroys k2 pagination
You should downgrade joomla version to 5.12 and wait next joomla update. I faced with this issue too

Please Log in or Create an account to join the conversation.

More
6 months 7 hours ago #181733 by JoomlaWorks
Replied by JoomlaWorks on topic Joomla 3.10.17 LTS destroys k2 pagination
Thanks for the heads up Kostas :)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago - 5 months 3 weeks ago #181740 by Ghita Mihai
Replied by Ghita Mihai on topic Joomla 3.10.17 LTS destroys k2 pagination
Hello!
After the Joomla 3.10.17 LTS update, the pagination in the K2 component no longer works.
The problem is in /libraries/src/Pagination/Pagination.php.
It was not solved in the new update Joomla 3.10.19 LTS
Before updating to Joomla 3.10.17 LTS the following page is displayed:
/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=1&Itemid=124&limitstart=12 (Works)
After updating to Joomla 3.10.17 LTS the following page is displayed:
/index.php?option=com_k2&view=itemlist&layout=category&id=1&Itemid=124&limitstart=12 (It doesn't work). It's missing &task=category
Last edit: 5 months 3 weeks ago by Ghita Mihai.

Please Log in or Create an account to join the conversation.

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
5 months 3 weeks ago - 5 months 3 weeks ago #181741 by Kostas Stathopoulos
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination
yes 3.10.19 LTS pagination settings still not working
Global Configuration/System Settings/Legacy pagination behaviour
Last edit: 5 months 3 weeks ago by Kostas Stathopoulos.

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago - 5 months 3 weeks ago #181742 by JoomlaWorks
Replied by JoomlaWorks on topic Joomla 3.10.17 LTS destroys k2 pagination
Either way what they are trying to solve (cache poisoning) is pointless. Joomla has been plagued by this issue since its inception. The proper approach would be a plugin category (e.g. routes or whatever) for each component to be able to register allowed query params for everything, not just pagination. But whatever...

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 5 months 3 weeks ago by JoomlaWorks.

Please Log in or Create an account to join the conversation.

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
5 months 3 weeks ago - 5 months 3 weeks ago #181743 by Kostas Stathopoulos
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination
Joomla 3.10.19 LTS K2 pagination FIX (from Joomla LTS Support):

Set System/Global Configuration/System Settings Legacy pagination behaviour to YES
edit view html php in
components/com_k2/views/itemlist/,

old:
if ($document->getType() != 'json') {
// Pagination
jimport('');
$total = (count($items)) ? $itemlistModel->getTotal() : 0;
$pagination = new JPagination($total, $limitstart, $limit);
}

After:
if ($document->getType() != 'json') {
// Pagination
jimport('');
$total = (count($items)) ? $itemlistModel->getTotal() : 0;
$pagination = new JPagination($total, $limitstart, $limit);
$pagination->setAdditionalUrlParam('task', $task);
}
Last edit: 5 months 3 weeks ago by Kostas Stathopoulos.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago - 5 months 2 weeks ago #181746 by Gee
Thank you Kostas for your help. This works.
It also works without activating legacy pagination behaviour.
So could this fix please be merged?
Last edit: 5 months 2 weeks ago by Gee.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago - 5 months 2 weeks ago #181752 by Ladyk
Replied by Ladyk on topic Joomla 3.10.17 LTS destroys k2 pagination
hi, the problem to me persists. adding &task=category nothing change

The problem is in the URL . I don't know how rewrite it. try to explain better

When I click the system use the default link
www.xxx/component/k/?view=itemlist&layout=category&id=15&Itemid=1395&start=48

and I have error 404 Component not found

If I use option=com_k2, it works

www.xxx/?option=com_k2&view=itemlist&layout=category&task=category&id=15&Itemid=1395&start=48

how can I fix, please? thank you
Last edit: 5 months 2 weeks ago by Ladyk.

Please Log in or Create an account to join the conversation.

More
5 months 1 week ago - 5 months 1 week ago #181762 by Nuno lopes
Replied by Nuno lopes on topic Joomla 3.10.17 LTS destroys k2 pagination
i have the samme problem with joomla 3.10.12
Last edit: 5 months 1 week ago by Nuno lopes.

Please Log in or Create an account to join the conversation.

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
4 months 1 week ago #181908 by Kostas Stathopoulos
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination
After  k2 v2.11.20240911 update, pagination stop working again
edit view html php in line 594 components/com_k2/views/itemlist/
and works again 
Joomla 3.10.19 LTS (with Global Conf/ System / Legacy pagination behaviour YES)

 if ($document->getType() != 'json') {
            // Pagination
            jimport('');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
            $pagination->setAdditionalUrlParam('task', $task);
        }

Please Log in or Create an account to join the conversation.

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
4 months 4 days ago - 4 months 4 days ago #182068 by Kostas Stathopoulos
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination
After k2 v2.11.20241016 update pagination stop working again...
 view html php in line 594 components/com_k2/views/itemlist/

        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
        }

With this change:
        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
            $pagination->setAdditionalUrlParam('task', $task);
        }

Pagination works again BUT pagination on k2 TAG menus NOT working
Wrong url
site.url/tagmenu/itemlist/tag?start=10
Instead of Correct url
site.url/tagmenu?start=10
can someone help?
Joomla 3.10.19 lts

I remember you telling us how good Joomla 3 is compared to the bad 4 & 5. We have been forced to pay support for Joomla 3 LTS but after every update we are looking for solutions to get it working. on the contrary, for months now I have never encountered any problem with my other sites in joomla 5
 
Last edit: 4 months 4 days ago by Kostas Stathopoulos.

Please Log in or Create an account to join the conversation.

  • Kostas Stathopoulos
  • Kostas Stathopoulos's Avatar Topic Author
  • Offline
  • New Member
More
4 months 3 days ago #182133 by Kostas Stathopoulos
Replied by Kostas Stathopoulos on topic Joomla 3.10.17 LTS destroys k2 pagination
solution from Joomla 3 LTS support:
components/com_k2/views/itemlist/
view html php  line 590

change from
        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
      }

to 

        if ($document->getType() != 'json') {
            // Pagination
            jimport('joomla.html.pagination');
            $total = (count($items)) ? $itemlistModel->getTotal() : 0;
            $pagination = new JPagination($total, $limitstart, $limit);
            $pagination->setAdditionalUrlParam('task', $task);

            if ($task === 'tag') {
                $pagination->setAdditionalUrlParam('tag', JRequest::getString('tag'));
            }
      }
 

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum