Author Topic: Double amp on select generic child variant  (Read 738 times)

woodybz

  • Beginner
  • *
  • Posts: 1
Double amp on select generic child variant
« on: May 13, 2013, 11:43:08 am »
Hi!

It's my first bug report and I'm not sure to explain very well the situation.

I reproduce the problem in a new VM installation with the sample data.
I use two different default joomla template: Atomic for the vm-shop and Beez2 for the other pages. (The problem still be present with other combination of templates).

On the product details view of "Hand shovel", we can select the Hand Shovel type (it is a "Generic child variant" custome field type).
When I select a different type, the output is a url with a double amp and the result is that the layout go to the Beez2 template and don't stay on the Atomic one.

Here is the example:
The url of product details page:
http://pionieri.crialtoadige.it/sito/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&virtuemart_category_id=1&Itemid=129

The url after select a different generic child variant:
http://pionieri.crialtoadige.it/sito/index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=1&virtuemart_product_id=13&Itemid=129

PHP 5.2.17
Joomla 2.5.11
VM 2.0.20b

Hope it could be useful for solve the problem! Thanks for your attention!

Woody

CE WebDesign München

  • Jr. Member
  • **
  • Posts: 112
  • CE WebDesign München
    • CE WebDesign München
CE WebDesign München: https://ce-webdesign.de | Websites, eCommerce WebShops | Responsive Design | SEO

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9804
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Double amp on select generic child variant
« Reply #2 on: May 26, 2013, 12:03:32 pm »
lol, I just checked it and found out that the normal link created by JRoute (disabled SEF) is creating the & . I set now the  second parameter to false and it works.
Code: [Select]
if ($xhtml)
{
$url = htmlspecialchars($url);
}

Why they do this? Hmmmm interesting, in fact it is a missing trailing slash. When there is a trailing slash the URL remains untouched. lol But that is stupid. With trailing slash there wont be any SEF, anylonger. So looks like we must add everywhere the second parameter. But it would be easier if joomla changes the standard behaviour. I still dont get the trick to escape a link
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

CE WebDesign München

  • Jr. Member
  • **
  • Posts: 112
  • CE WebDesign München
    • CE WebDesign München
Re: Double amp on select generic child variant
« Reply #3 on: May 26, 2013, 16:42:55 pm »
thanks for the info, so it is a joomla issue?

I only found this:

"If the user turns off SEF URLs in the site's settings, JRoute::_ will produce working non-SEF URLs
without any changes to the code." http://docs.joomla.org/Supporting_SEF_URLs_in_your_component#The_Concept

but I'm sorry, this is way beyond my skills...
CE WebDesign München: https://ce-webdesign.de | Websites, eCommerce WebShops | Responsive Design | SEO

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9804
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Double amp on select generic child variant
« Reply #4 on: May 27, 2013, 00:09:27 am »
I have a version here, in which I hopefully fixed it. Set almost everywhere as second parameter false. seems to work now
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/