News:

Support the VirtueMart project and become a member

Main Menu

Pagination broken in category 0(root)

Started by Studio 42, October 18, 2017, 15:49:24 PM

Previous topic - Next topic

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

I can confirm that max code fix the bug.

Studio 42

Sorry, this give another BUG, you cannot return to first page.

Studio 42

#18
The only way to prevent the new bug is to add in the XML /components/com_virtuemart/views/category/tmpl/default.xml
<field name="start" type="hidden" default="0" />
<field name="limitstart" type="hidden" default="0" />

inside the
<fieldset name="request" >

</fieldset>

else you cannot return to first page, because the start and limit start is empty and is set from session in the model.

But another problem stay. Any user can set the number of displayed product if this is not higher then $this->_maxItems
i changed protected $_maxItems = 24; because i only use this.
But this should be a config value, i had deny of service warnings on my demo shop, because this(i have a protection on the server to not crash server).
This can simply crash shops, so should be added urgently in Virtuemart, to have always a stable shop, in the config.

You can try for eg. http://pro.st42.fr/en/results,2353-4704, it only display 24 products
Note that because this values is used in all models, so can give some problems(category tree, childs ...) i don't really checked all the code.

Studio 42

Max, your fix not prevent old page bugs.
I have now a customer complaining because he have 500 Errors on google, trying to display 1-208 results.
you should force to max limit, if any limit is set over max limit.
Another problem is that i have more and more component/virtuemart/ result displayed in Google search, i had not this problem in old VM releases and this seems to come from ordering links in root.

Milbo

Hello Patrick, thank you for reporting.

First: I have no problem to return to page 1. Maybe I already took your fixes, or there is another problem.

Second. There is already a maxitem thing as you know from the other thread ("menu item productdetails has max 700 products"). This value can also be changed due the hidden config. $this->_maxItems = VmConfig::get ('absMaxProducts', 700);
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Quote from: Milbo on February 26, 2018, 11:48:04 AM
Hello Patrick, thank you for reporting.

First: I have no problem to return to page 1. Maybe I already took your fixes, or there is another problem.

Second. There is already a maxitem thing as you know from the other thread ("menu item productdetails has max 700 products"). This value can also be changed due the hidden config. $this->_maxItems = VmConfig::get ('absMaxProducts', 700);
I think it's for all case, not only categories ? Eg. For children products

julash

Is updated version of this fixed published yet? We are having this problem on our website, but only on manufacturer product listing page. Manufacturer products listing showing 120 products per page when go back from a single product page. Per page products limits set is 52, I tried reducing to 24 or 12 but no luck. Going back show 120 products per page always until hard refresh.

But, it seem on this links http://pro.st42.fr/fr/fournisseur/zte and http://demo.virtuemart.net/manufacturer/default pagination is same and working fine after I go back from a product page. I updated virtuemart to 3.2.13 but problem is still there.

demo.virtuemart.net using 3.2.14, so wondering if we need to wait? Please help.

Thanks

Studio 42

I internal fixed t(core hack), i dont know if it's fixed for now.
Pagination can be set by user in any category, not only in root. It should check for the pagination sequel or max pagination set in back-end to prevent it.
I dont write the code and dont set the priority, only core dev can choose to fix this for all cases.