Author Topic: Product category not loading in product view  (Read 640 times)

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13
Product category not loading in product view
« on: August 10, 2018, 11:50:32 am »
Hi
Hope someone can help
When I view product details in admin, the product category fails to load - I just get the loading symbol forever and ever!

Using Joomla 3.8.11
PHP 7.0.31
VM 3.2.14

When I do F12 to view errors I get - Failed to load resource: the server responded with a status of 503 (Service Temporarily Unavailable). Which makes sense as it is referring to the product categories
Why would the server not be responding for the categories but responding for everything else?

However, I have no idea why!

Seemed to happen after updating to latest VM

Anyone else had this problem?

Thanks
Malcolm

Any help would be most welcome

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1808
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Product category not loading in product view
« Reply #1 on: August 10, 2018, 12:51:19 pm »
Template used ?
Live URL ?

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8593
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Product category not loading in product view
« Reply #3 on: August 10, 2018, 13:22:41 pm »
you mean the cats drop down in the product details admin?

it loads by ajax and can be problematic with some servers/hosts

try this url (logged in of course)

http://thepigeonshooter.com/administrator/index.php?option=com_virtuemart&view=product&type=getCategoriesTree&virtuemart_product_id=65&format=json&lang=en

what is the response?

If still 503 etc u need to find out why
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

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13
Re: Product category not loading in product view
« Reply #4 on: August 10, 2018, 14:49:56 pm »
Hi

I get a - 403 You are not authorised to view this resource - error message

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1808
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Product category not loading in product view
« Reply #5 on: August 10, 2018, 15:00:37 pm »
You must be logged in as admin :)

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8593
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Product category not loading in product view
« Reply #6 on: August 10, 2018, 15:06:22 pm »
Quote
try this url (logged in of course)
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

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13
Re: Product category not loading in product view
« Reply #7 on: August 10, 2018, 15:17:38 pm »
I get code for all the categories which I assume is what is trying to load but is failing

I can post if it will help

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8593
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Product category not loading in product view
« Reply #8 on: August 10, 2018, 17:23:19 pm »
but how can that be?

that is simply what the page is doing - calling a resource .. but u say it returns a server error .. yet u can see the JSON return

doesn't add up  :(

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

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13
Re: Product category not loading in product view
« Reply #9 on: August 10, 2018, 17:58:38 pm »
I know - it is frustrating

But I have got to find a way round it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3534
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Product category not loading in product view
« Reply #10 on: August 10, 2018, 23:16:08 pm »
First to do, is to set PHP error reporting to none in Joomla config.
If you have any php warning or error , the it faills to load Json response.
Another problem, is that some server cache Json
See for eg this .htaccess file https://gist.github.com/solancer/a51cf728a119a16f4c6ce494864a2d47 so Json get not cached

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13
Re: Product category not loading in product view
« Reply #11 on: August 13, 2018, 11:02:19 am »
Hi

I have changed Error reporting to None

I have changed the htaccess file

Still no change

I have just changed PHP version back to 5.6. This is a long shot but thought I would give it a try. Just waiting for server to update

Thanks for all the help from people on the forum
Malcolm

MalcolmTrotter

  • Beginner
  • *
  • Posts: 13
Re: Product category not loading in product view
« Reply #12 on: August 17, 2018, 14:21:49 pm »
Hi

Checked 2 other sites that use VM and they have the same problem.

They are on different servers and use templates from different suppliers

Malcolm

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8593
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Product category not loading in product view
« Reply #13 on: August 17, 2018, 17:02:08 pm »
hmmm ...  I see only two other solved posts with this problem ( since moving to ajax)  - I look after dozens of VM sites on various servers world wide and none have any problems.. so ..
if this really is problematic for you and it isn't solvable then I guess move back to the old way of getting the cats ..~ vm3.2.10 maybe was the change

I assume in the vmhtml helper somewhere
...
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