News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

ERROR and FIX for VM JRoute

Started by lopezalejandro, February 01, 2013, 21:28:39 PM

Previous topic - Next topic

lopezalejandro

Hi! Max and VM Team!
I and Dajo (Artio Joomsef Team) found an error on viertuemart JRoute.

<option value="/gardentools/?limit=2&amp;amp;limitstart=6">2</option>

Notice the amp;amp; part - there should be only one amp;. This causes problems when JoomSEF converts URLs to SEF.

The fix needs to be applied in the /administrator/components/com_virtuemart/helpers/vmmodel.php file.

1. Open the /administrator/components/com_virtuemart/helpers/vmmodel.php file in text editor
2. In class VmPagination find the function getLimitBox()
3. In that function between lines 699 and 710 there is the function JRoute::_() called multiple times, for example the following line:

$limits[]=JHtml::_('select.option', JRoute::_( $link.'&limit='. $items), $items);


4. Find every occurence of the JRoute::_() function call and add one parameter to it with value "false", so the line from previous step will become:

$limits[]=JHtml::_('select.option', JRoute::_( $link.'&limit='. $items, false), $items);


notice the ", false" being added inside the JRoute::_() function call

This should fix the multiple amp; problem.

The problem is that by default the JRoute::_() function already uses &amp; in the generated URL, but Joomla's JHTML::_('select.genericlist') function used later replaces the "&" character with another "&amp;".

Pleas, fix it for the next version :) Thanks!!
Alejandro López
Grupo Odín Soluciones Informáticas
http://grupoodin.es

wanderschaft

... I have a similar problem when the user ist changing the list limit step within a category/categories view. then the modules disapear (because Item Id is lost)

index.php?option=com_virtuemart&amp;view=category&amp;virtuemart_category_id=14&amp;Itemid=326&amp;limit=20
this works better (without "amp"):
index.php?option=com_virtuemart&view=category&virtuemart_category_id=14&Itemid=326&limit=20

vm 2.0.18a
j2.5.7

Milbo

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