News:

Support the VirtueMart project and become a member

Main Menu

Pagination link problems

Started by sandomatyas, September 18, 2017, 13:14:59 PM

Previous topic - Next topic

sandomatyas

Sometimes (not every time) my pagination links in category view are broken.
I get /?start=100 instead /category-slug/?start=100
The front page of the site is an old "front page" type VM menu item.
I tried to figure what is happening and found VmPagination._buildDataObject method
There is a line:
if (!empty($this->_additionalUrlParams))
I added some more code before it:
$virtuemart_category_id = JFactory::getApplication()->input->getInt('virtuemart_category_id', 0);
if($virtuemart_category_id) $this->_additionalUrlParams['virtuemart_category_id'] = $virtuemart_category_id;
$view = JFactory::getApplication()->input->get('view', '');
if($view) $this->_additionalUrlParams['view'] = $view;

As far as I can see it fixed my issue.

I don't know if anybody has the same problem or it helps to decode what the problem is but I leave this here :)