VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: MalcolmTrotter on August 10, 2018, 11:50:32 AM

Title: Product category not loading in product view
Post by: MalcolmTrotter 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
Title: Re: Product category not loading in product view
Post by: Jörgen on August 10, 2018, 12:51:19 PM
Template used ?
Live URL ?

Jörgen @ Kreativ Fotografi
Title: Re: Product category not loading in product view
Post by: MalcolmTrotter on August 10, 2018, 13:10:21 PM
URL - http://thepigeonshooter.com/

TEMPLATE - https://www.joomshaper.com/joomla-templates/megadeal
Title: Re: Product category not loading in product view
Post by: GJC Web Design 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
Title: Re: Product category not loading in product view
Post by: MalcolmTrotter on August 10, 2018, 14:49:56 PM
Hi

I get a - 403 You are not authorised to view this resource - error message
Title: Re: Product category not loading in product view
Post by: Jörgen on August 10, 2018, 15:00:37 PM
You must be logged in as admin :)

Jörgen @ Kreativ Fotografi
Title: Re: Product category not loading in product view
Post by: GJC Web Design on August 10, 2018, 15:06:22 PM
Quotetry this url (logged in of course)
Title: Re: Product category not loading in product view
Post by: MalcolmTrotter 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
Title: Re: Product category not loading in product view
Post by: GJC Web Design 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  :(

Title: Re: Product category not loading in product view
Post by: MalcolmTrotter on August 10, 2018, 17:58:38 PM
I know - it is frustrating

But I have got to find a way round it
Title: Re: Product category not loading in product view
Post by: Studio 42 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
Title: Re: Product category not loading in product view
Post by: MalcolmTrotter 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
Title: Re: Product category not loading in product view
Post by: MalcolmTrotter 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
Title: Re: Product category not loading in product view
Post by: GJC Web Design 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
...