News:

Looking for documentation? Take a look on our wiki

Main Menu

404 The requested product does not exist

Started by dmb, February 07, 2016, 10:36:52 AM

Previous topic - Next topic

dmb

I've been trying to solve this for nearly a week and I'm stumped ... I would just love any ideas for where to start trying to fix this !

Joomla 3.4.8
Virtuemart 3.0.12

This used to work, now it doesn't ... yep, something's changed (probably by me) but I don't know when or where.

I have a product on my site called Annual Membership, with three child products. A link to the base product is shown on the front page of our site at http://oups.yellowbell.net. On the product page that this leads to, it used to be the case that selecting one of the child products from the drop-down would change the price displayed. However now a spinning circle appears and never goes away. Hitting refresh results in a 404 err being shown in the messages box, as if the ajax code is requesting a non-existent product !!

I've disabled all caching, overrides etc., with no effect. I'm completely stumped, can't even think of anything else to try ...

Any ideas gratefully received !

David

GJC Web Design

first step is to switch off all SEF urls so u can actually see what is happening

then on the page http://oups.yellowbell.net/index.php/component/virtuemart/memberships (which will change to a normal url) you can see the actual urls and start to troubleshoot

have u a menu to com_virtuemart Home page? This is a must.. either shown or hidden..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

dmb

Hi,

Thanks so much for your reply, you've got me started !

I turned off SEO in Virtuemart configuration, and went to the url in your post. It actually started working correctly ! When I selected a product from the dropdown the price changed correctly. However it didn't always work. Another strange thing is that one of the product names is out of date - almost as if it was cached somehow. I cleared the Joomla cache but that didn't affect it, I still don't know where it's getting that product name from as it was a minor change I made early this morning which I reversed out. Maybe there's a Virtuemart cache somewhere ?

I also disabled the JCH Optimise plugin that I used before to do JS/CSS merge/gzip/etc. and switched off the compression options in my template (yoo_nano3).

Then I remembered there's also SEO in Joomla Global Configuration. I switched that off too, and bizarrely some of the images disappeared from our home page - I couldn't figure out why. However I thought it might be something to do with browser caching so I restarted my browser.

Now it all seems to work ... so I think it's some combination of either Joomla SEO or Virtuemart SEO. I'll keep looking, see if I can find root cause.

I wasn't sure what you meant by "have u a menu to com_virtuemart Home page? This is a must.. either shown or hidden.." - I think I must have though, as my other product category is working fine (everything displays as expected, can go in the cart/checkout/etc.).

Thanks again !

David

GJC Web Design

Now step by step re-introduce each of the settings to see where it breaks

IMHO JCH Optimise will only cause endless grief .. probably also the template compression..

caching has to be used very carefully.. its a shop!  Pages are rarely the same

You should be happily able to use native Joomla SEF (and of course VM SEF)

I use no caching on any of my builds.. VM category views are always cached and must be cleared via the normal Joomla cache clear after any product changes

you must have somewhere a menu to the VM Homepage (hidden or displayed) for VM to work corrctly with SEF on
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

dmb

This is almost some kind of caching issue too I think.

Having switched off all SEO settings and JCH, and cleared the Joomla cache I now have things working as peeviously. However there's an odd situation still ...

I have a base product (Annual Membership) with several variants/child products. Those that I had set up in the past now appear exactly, they show in the dropdown and the prices change correctly. But new child products I define don't appear in the dropdown. I can't see any difference between the existing ones and the new ones !!

Is there some kind of Virtuemart cache somewhere ? I've cleared the mysql query cache and my browser cache, can't think of any others to clear ha ha !!'

So close, it's been the most productive day for a week and I'd love to get this last issue out of the way :)

David

GJC Web Design

if you have all and any caches off (which u should for any dev) (and prob for production) and your on a products details page there is no caching

(perhaps server/cloud flare rubbish?)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

dmb

I think I found the problem (at least one of them).

In my template there was an option to either:

1. Minify CSS and JavaScript into a single file.
2. Minify CSS and JS and use Data URIs to reduce image file requests. <<--- THIS LOOKS LIKE IT MIGHT BE THE PROBLEM
3. Minify plus Data URIs plus gzip compression.

Having disabled this and deleted everything in the public_html/cache directory everything seems to work for now !

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/

dmb

I think it's a bit slower, but better slow and working than fast and broken, right ? :)

I'll try switching on some options today to see how far I can take it but I'm thinking I might have to compensate by getting more silicon behind the site.

dmb

Just an update for anyone struggling with the same problem ...

Just a reminder - my main site was in /var/www/site_dir and I created a new version in /var/www/site_dir/new. The problem was in the new version.

Having switched off all overrides, disabled all caching (Joomla and template) and switched off all SEF/SEO (Joomla Global Config and Virtuemart Shop/SEO) in the new site it started to work as expected. This suggested it was a combination of some or all of these. I re-instated my Virtuemart overrides and it continued to work fine, so I left it at that with SEO and caching disabled.

---------------

I then had to move the whole site to a new hosting provider and elected to run it on a bare bones system rather than a managed hosting environment. I copied the site directory and database info exactly from one server to the other, but now the original site did not work - only the front page worked, everything else returned 404 errors. I switched off apache rewrite in the Joomla config and all the links on the site worked again. However Virtuemart checkout did not work - it reported a 404 error on checkout, citing a SEF style URL.

Now I dug a little deeper. I verified that mod_rewrite was loaded. However my apache config file specified "AllowOverrides None", so my rewrite rules in /var/www/site_dir/.htaccess were being ignored. I changed this to "AllowOverrides All", re-enabled the apache mod_rewrite option in the Joomla config and the original site was 100% functional again.

Having solved that problem, I wondered if I could get the SEF/SEO working on the new site in /var/www/site_dir/new. I found that the .htaccess file was incorrect so copied the Joomla provided htaccess.txt to .htaccess, uncommented the "RewriteBase /" line and changed it to "RewriteBase /new". I then switched on Joomla SEO and Virtuemart SEO and everything now works as I would expect. My conclusion is that my previous problems were due to SEF/rewriting misconfiguration, probably compounded by caching which I have left off.

Milbo

Thank you for your detailled post.

Quote from: dmb on February 15, 2016, 17:47:24 PM
My conclusion is that my previous problems were due to SEF/rewriting misconfiguration, probably compounded by caching which I have left off.

Yes, you used the option rewrite URL, but the htaccess was wrong. VM works fine in subdirectories, but of course, when you activate the URL rewrite, the htaccess must fit.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/