Author Topic: HTTP response codes  (Read 1230 times)

behemoth

  • Jr. Member
  • **
  • Posts: 81
HTTP response codes
« on: October 22, 2018, 16:15:09 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9031
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: HTTP response codes
« Reply #1 on: October 22, 2018, 16:31:24 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

behemoth

  • Jr. Member
  • **
  • Posts: 81
Re: HTTP response codes
« Reply #2 on: October 22, 2018, 16:42:29 pm »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9031
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: HTTP response codes
« Reply #3 on: October 22, 2018, 16:44:44 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10358
  • VirtueMart Version: 3+
Re: HTTP response codes
« Reply #4 on: November 02, 2018, 19:59:35 pm »
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
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)