- Posts: 8
COMMUNITY FORUM
Joomla 3.10.17 LTS destroys k2 pagination
- Kostas Stathopoulos
-
Topic Author
- Offline
- New Member
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.
- eugen
-
- Offline
- Junior Member
- Posts: 23
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6225
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Ghita Mihai
-
- Offline
- New Member
- Posts: 6
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
Please Log in or Create an account to join the conversation.
- Kostas Stathopoulos
-
Topic Author
- Offline
- New Member
- Posts: 8
Global Configuration/System Settings/Legacy pagination behaviour
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6225
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Kostas Stathopoulos
-
Topic Author
- Offline
- New Member
- Posts: 8
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);
}
Please Log in or Create an account to join the conversation.
- Gee
-
- Offline
- New Member
- Posts: 8
It also works without activating legacy pagination behaviour.
So could this fix please be merged?
Please Log in or Create an account to join the conversation.
- Ladyk
-
- Offline
- New Member
- Posts: 16
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
Please Log in or Create an account to join the conversation.
- Nuno lopes
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Kostas Stathopoulos
-
Topic Author
- Offline
- New Member
- Posts: 8
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
-
Topic Author
- Offline
- New Member
- Posts: 8
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
Please Log in or Create an account to join the conversation.
- Kostas Stathopoulos
-
Topic Author
- Offline
- New Member
- Posts: 8
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.