Author Topic: Problem with paging.  (Read 4792 times)

RedJohn

  • Beginner
  • *
  • Posts: 25
    • Tusze do drukarek
Problem with paging.
« 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

This should give a product in third page. Unfortunately there first.
When you refresh the page has loaded the correct content.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28254
  • Always on vacation
    • Jenkin Hill Internet
Re: Problem with paging.
« Reply #1 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
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

RedJohn

  • Beginner
  • *
  • Posts: 25
    • Tusze do drukarek
Re: Problem with paging.
« Reply #2 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:

Code: [Select]
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

Code: [Select]
$limitStart = JRequest::getInt('limitstart',0);

Florentp

  • Jr. Member
  • **
  • Posts: 86
Re: Problem with paging.
« Reply #3 on: September 13, 2013, 14:07:35 pm »
I have the same problem since months, but i always thought it was associate with Sh404sef...
Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

Florentp

  • Jr. Member
  • **
  • Posts: 86
Re: Problem with paging.
« Reply #4 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.
Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3738
  • using Matomo instead of Google Analytics
Re: Problem with paging.
« Reply #5 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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Florentp

  • Jr. Member
  • **
  • Posts: 86
Re: Problem with paging.
« Reply #6 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.

Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2656
Re: Problem with paging.
« Reply #7 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?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

RedJohn

  • Beginner
  • *
  • Posts: 25
    • Tusze do drukarek
Re: Problem with paging.
« Reply #8 on: November 27, 2013, 14:29:52 pm »
This problem still exist in vm 2.0.24c