Product Details links doesnt work after upgrade from 2.0.18a in 2 sites

Started by sandstorm, April 24, 2013, 17:55:44 PM

Previous topic - Next topic

sandstorm

I upgraded a site last week from 2.0.14 to 2.0.20b.
Afterwards I noticed that when you click on product details, the page just refreshed although the URL was the new URL from those product details.
This was the same for when I was using SH404 or Joomla default SEF.  When both of these are off then all works OK.

At first I thought it was a problem with the site or maybe virtuemart theme/template?


But yesterday I just upgraded another big busy site (in a test environment thankfully  ??? ) from 2.0.18a to 2.0.20b and I am getting the exact same problem.
When SH404 or Joomla SEF is switched on, I cannot click to see any products from category pages.
When I click on product details or product link, the page seems to refresh but the URL shows correct.


So as all other links work OK throughout the site and the only thing different is upgrade to VM2.0.20B  I'm guessing there is some sort of bug here.
But I am a bit surprised that I cannot see anything showing up in forums about it?


Both of these sites are on complete different servers, bit have had all site/browser cache cleared and DB repair/optimised using akeeba admin tools!

Does anyone have any advice or help?
Andy
J3.6.4 / PHP7.0.12
VM3.0.16

sandstorm

Sorry cant seem to modify my original post,.
Anybody have any ideas, clues, comments on this?

I have this same problem in 2 sites. 1 has 1000's of products & uses stockable variants and the other only 15 or so products with standard children product setup

I surely cant be the only person with this problem?  I could understand if both sites used identical setting but 1 uses Joomla SEF and the other SH404.
And teh problem is only there when clicking in the product details link?
J3.6.4 / PHP7.0.12
VM3.0.16

Peter Pillen

I would suspect this is your template (both of them) or the way the url rewrite is setup in the backend. Product detail links are hardcoded in the template. But this can actually have multiple reasons to fail... even caching

1. caching problem -> so test again with all cache disabled and cleared. Showing the same page with a different url, makes me think of caching
2. template problem -> try using the VM default template instead of your own to determine if your template is causing this
3. recheck how the url rewriting is setup

for comparison... my productdetail link is coded like this

echo JHTML::link($product->link, JText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), array('title' => $product->product_name,'class' => 'product-details'));

Peter Pillen

also for standard joomla caching check the file libraries\joomla\cache\controller\view.php

bottom of the file... maybe add the JURI:current() like below. This prevents duplicate cache file id's because the url is also used for the id.

return md5(serialize(array(JCache::makeId(), get_class($view), $method, JURI::current())));

sandstorm

I'm revisiting this as I still seem to have this problem, I just got around it before as I had left SEF Off, with all SEF off it all works OK.

So my set up is now;
J2.5.16 / vm2.0.24C / php5.3.27
htaccess.txt changed to .htaccess & Jommla SEF on. & I have disabled all cache.
I tried with default VM theme (no overides) & Also default Joomla Atomic template.

When clicking on product details, page just seems to refresh and not open up the product details. But when looking at the URL it will have changed from /category to /category/product-name

What else can I check for URL rewriting?

Also In VM > Configuration > SEF Settings I check ed the box for "Use product & category ID's" Since doing this, instead of the page just refreshing I now also see an error "COM_VIRTUEMART_CAT_NOT_FOUND"
J3.6.4 / PHP7.0.12
VM3.0.16

Peter Pillen

do you have a seo suffix set in virtuemart > configuration > configuration > seo ?

Without that suffix you can have problems.

sandstorm

 :-X :-X :-X

Can't believe it!, That was it!
Thanks Peter!
Added -pb to the seo suffix and all working fine now with Joomla SEF.  :'( :-[ ::) :o
J3.6.4 / PHP7.0.12
VM3.0.16

Peter Pillen

when you typed "/category to /category/product-name" my penny dropped ;)

I guess you're happy and angry at the same time now. Figuring this out after x months is sh*t LOL ;D