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

HTTP response codes

Started by behemoth, October 22, 2018, 16:15:09 PM

Previous topic - Next topic

behemoth

Hi All,

Not sure if this is the right place to put this - I searched, but I may have missed something obvious because I'm not very familiar with the topic.

I have a separate and unrelated application that from time to time needs to access images on my webserver that are used by my site. I want to be able to determine if they're present or not. In theory, I pass the full URL to the image, and get either the image or an HTTP 404 error code back.

With VM 404 handling enabled however, it's returning an error code of 200 (OK), so if my application is checking headers, I either get a 200 if the image is present or a 200 if the image is not present. You can see my problem...

For usability reasons, having the VM 404 handling is ideal; we'd much rather customers saw the homepage than an error. Is it possible to reconcile these two things? If so, how?

Cheers,
Ian


GJC Web Design

are u using VM3.4.2??

work has been done on this with a bit more to come in the next version .. 
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

behemoth

No - we've actually got multiple sites where this is an issue. They're on 3.2 (different subversions) and stuck in testing before we can upgrade to the latest version :D.

GJC Web Design

then use 3.4.2  .. the vm 404 has been over hauled  -- there are still some nurgles  .. a recursion problem   - see http://forum.virtuemart.net/index.php?topic=141213.0
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

PRO

you are requesting the image url? from outside of vmart?

why would vmart 404 return anything?

are you requesting the product page and then extracting the image from it?

better to create an empty view and select the image from parameter