Virtuemart 1.1.5 Pagination bug
- Greg
-
Topic Author
- Offline
- New Member
-
14 years 6 months ago - 14 years 6 months ago #5676
by Greg
Joomla 3.4.3 / SefAdvance 1.8.0 / AJAX Register 1.8.8 / virtuemart 3.0.9.4 / PHP 5.4.43
Hello all, and hello again Emir
Recently I sent you a mail from my desk at work, and said that the pagination bug was fixed with a patch that will be part of the 1.1.6 VM package.
First, just to recall and help others, here you are:
(add this just after line 1326 in file ps_main.php)
But it was only the first part of the fix.
Because today I've noticed that now the VM pagination don't throw anymore 404 at all, but still don't work.
And I've found that this is an issue from (finally) the sef_ext.php
If I remove the sef_ext the pagination is back and work perfectly, so I've set the Sef Advance debug to on, and noticed that:
Without sef_ext, a pagination link look like, for example:
/index.php?option=com_virtuemart&category_id=17&page=shop.browse&Itemid=53&limit=20&limitstart=20
Rewrite link give:
/option,com_virtuemart/category_id,17/page,shop.browse/Itemid,53.html?limit=20&limitstart=20
With sef_ext same link:
/index.php?option=com_virtuemart&Itemid=53&page=shop.browse&category_id=17&limit=20&limitstart=20
Rewrite link give:
/virtuemart/category.html?limit=20&limitstart=20
As a result that whatever the pagination link, we are always redirect to the first page of the current category.
Just because of the misplaced &Itemid= (menu ID of com_virtuemart).
Simple test without &Itemid=53 :
/index.php?option=com_virtuemart&page=shop.browse&category_id=17&limit=20&limitstart=40
Rewrite and pagination ok:
/virtuemart/category/20/40.html
Test with the &Itemid=53 at his right place:
/index.php?option=com_virtuemart&page=shop.browse&category_id=17&Itemid=53&limit=20&limitstart=60
Rewrite and pagination ok:
/virtuemart/category/20/60.html
In other words, we could simply tell that the sef_ext.php is not compatible with VM 1.1.5 (and for sure you told it emir, it's only for the 1.1.4 at this time ^^)
Thanks for reading, and hope you could provide a fix for the sef_ext.php
Recently I sent you a mail from my desk at work, and said that the pagination bug was fixed with a patch that will be part of the 1.1.6 VM package.
First, just to recall and help others, here you are:
(add this just after line 1326 in file ps_main.php)
// solve an issue with "?" and "&" in the wrong place in the URL
if(!strpos('option=com_virtuemart',$nonSefUrl)) {
$nonSefUrl = str_replace( '&', '&', $nonSefUrl);
$nonSefUrl = str_replace( '?', '&', $nonSefUrl);
if(strpos($nonSefUrl,'&')) $nonSefUrl=preg_replace('/&/', '?', $nonSefUrl, 1);
return $nonSefUrl;
}
But it was only the first part of the fix.
Because today I've noticed that now the VM pagination don't throw anymore 404 at all, but still don't work.
And I've found that this is an issue from (finally) the sef_ext.php
If I remove the sef_ext the pagination is back and work perfectly, so I've set the Sef Advance debug to on, and noticed that:
Without sef_ext, a pagination link look like, for example:
/index.php?option=com_virtuemart&category_id=17&page=shop.browse&Itemid=53&limit=20&limitstart=20
Rewrite link give:
/option,com_virtuemart/category_id,17/page,shop.browse/Itemid,53.html?limit=20&limitstart=20
With sef_ext same link:
/index.php?option=com_virtuemart&Itemid=53&page=shop.browse&category_id=17&limit=20&limitstart=20
Rewrite link give:
/virtuemart/category.html?limit=20&limitstart=20
As a result that whatever the pagination link, we are always redirect to the first page of the current category.
Just because of the misplaced &Itemid= (menu ID of com_virtuemart).
Simple test without &Itemid=53 :
/index.php?option=com_virtuemart&page=shop.browse&category_id=17&limit=20&limitstart=40
Rewrite and pagination ok:
/virtuemart/category/20/40.html
Test with the &Itemid=53 at his right place:
/index.php?option=com_virtuemart&page=shop.browse&category_id=17&Itemid=53&limit=20&limitstart=60
Rewrite and pagination ok:
/virtuemart/category/20/60.html
In other words, we could simply tell that the sef_ext.php is not compatible with VM 1.1.5 (and for sure you told it emir, it's only for the 1.1.4 at this time ^^)
Thanks for reading, and hope you could provide a fix for the sef_ext.php
Joomla 3.4.3 / SefAdvance 1.8.0 / AJAX Register 1.8.8 / virtuemart 3.0.9.4 / PHP 5.4.43
Last Edit: 14 years 6 months ago by Greg.
Please Log in or Create an account to join the conversation.