VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: RedJohn on September 10, 2013, 15:34:30 PM

Title: Problem with paging.
Post by: RedJohn on September 10, 2013, 15:34:30 PM
Hi, I have a problem with virtuemart 2.0.21f + Joomla! 2.5.11.
I do not know if in the right section I ask. If you do not then I'm sorry and ask for a transfer. Sorry for my english.

The problem occurs with Paging.
If you walk through the store it all works normally would.
However, if you come from another location such as on the web site:

http://www.e-tusze.pl/tusze/canon-inks/cli-8/results,21-20 (http://www.e-tusze.pl/tusze/canon-inks/cli-8/results,21-20)

This should give a product in third page. Unfortunately there first.
When you refresh the page has loaded the correct content.
Title: Re: Problem with paging.
Post by: jenkinhill on September 10, 2013, 15:53:24 PM
VirtueMart 2.0.21f was a testing version with known bugs - and now known security issues. Suggest you update to the latest secre version - we are now at 2.0.22d

See http://virtuemart.net/news/list-all-news/446-important-security-release-vm-team-at-joomladay-germany
Title: Re: Problem with paging.
Post by: RedJohn on September 10, 2013, 15:59:08 PM
I do not think this has been fixed in the new version because I have uploaded the test folders with the new version and I noticed no change.

EDIT

I checked it on another site (not mine) and also see a similar error.

http://cart.tendaydesign.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=6&limit=3&limitstart=6

Looks like a bug in the code virtuemart 2
Bug is so serious that it can interfere with indexing in Google and other search engines. It also interferes with internal linking (Search Engine Visibility drops) and causes Duplicate Content, as all parties with a direct entrance point to the page first.


EDIT

the following example:
Please go to:
http://demo.virtuemart.net/index.php/2012-01-13-09-33-20/virtuemart-default-layout/mp3-player/results,4-5
and remember the content of this website.
Please refresh it.
The content will be different at the same address url.


EDIT
I found a solution.
I do not know whether it is appropriate, but I think it works.

file: \administrator\components\com_virtuemart\helpers\vmmodel.php
public function exeSortSearchListQuery

before:


if($this->_noLimit or empty($limit)){
// vmdebug('exeSortSearchListQuery '.get_class($this).' no limit');
$this->_db->setQuery($q);
} else {
$this->_db->setQuery($q,$limitStart,$limit);
// vmdebug('exeSortSearchListQuery '.get_class($this).' with limit');
}


add

$limitStart = JRequest::getInt('limitstart',0);
Title: Re: Problem with paging.
Post by: Florentp on September 13, 2013, 14:07:35 PM
I have the same problem since months, but i always thought it was associate with Sh404sef...
Title: Re: Problem with paging.
Post by: Florentp on September 17, 2013, 15:08:05 PM
Ok, your trick is working for me, this is perfect, thank you a lot.

I think that the problem is that Virtuemart keep in session the "limit" parameter, because it's suppose to be choose by the customer.
There is like a conflict between session value, GET parameter, and category limit value, defined in Virtuemart backoffice (sql : limit_list_start column)
On my website, i have some page were i choose to display 30 products when  in Virtuemart, default value is "27".

So if I visit a category with a a get parameter "limit=27", it will stock that value in session, and use it on the next visited category, if no limit is set in url.
But when we go to Page 2, it use the category limit parameter, and then everything is brocken.

Hope that my explaination will help. It's not really clear to me, but I'm pretty sure it's something like that.
Title: Re: Problem with paging.
Post by: jjk on September 17, 2013, 23:50:48 PM
2.0.21f had a pagination bug. limit_list_start was removed from the code in the following version and some new pagination settings were added in VM Configuration > Templates tab. I didn't see that problem again in later versions and pagination also works for me in 2.0.22d.
Title: Re: Problem with paging.
Post by: Florentp on September 18, 2013, 12:03:10 PM
I'm on last release (2.0.22d).
I think the problem occur when you use Get parameter (?limit=x) + global parameter (Frontend default items per list view) + product category limit parameter (Category Pagination Sequence) on your website, and if it don't have always the same value.

Title: Re: Problem with paging.
Post by: Maxim Pishnyak on September 18, 2013, 20:38:18 PM
What 3rd party extensions do you have? Do you confirm that issue isn't gone after switching on standard Joomla template?
Title: Re: Problem with paging.
Post by: RedJohn on November 27, 2013, 14:29:52 PM
This problem still exist in vm 2.0.24c