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

Getting a loading icon for categories when adding product [was host problem]

Started by RRPhotography, March 04, 2020, 22:08:40 PM

Previous topic - Next topic

RRPhotography

I am using the latest version of Joomla 3.9.15 and the new VM version 3.6.0 and PHP Version 7.3.15. YooTheme pro template. 

When I go an add a product the Category drop down just sits there spinning with a LOADING icon and I can't select a category, which means I can't use VM at all.

I have tried reinstalling VM but that didn't work from
the VM area, wiped database data, then also started again with example data but that didn't help either, I then also installed from scratch using the VM zip file and uploaded that way but still didn't work.

I had read somewhere adding my domain in site_url in the configuration.php script would fix it but that screwed the whole site up so that didn't work either.

Does anyone know how I can fix this issue as I really want to get my store up and running as soon as possible.

Many thanks folks.

Studio 42

If you have PHP error debug active(in Joomla config or server config), then perhaps this break the returned response, the categories tree is loaded using ajax.

GJC Web Design

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

RRPhotography

Debug is turned off and also just turned off server error reporting but still sitting there saying loading.

RRPhotography

When I pasted that URL into my browser I get this white page with this text.

{
    "value": "<option   value=\"1\">Photo Prints<\/option>"
}

Quote from: RRPhotography on March 04, 2020, 22:43:46 PM
Debug is turned off and also just turned off server error reporting but still sitting there saying loading.

RRPhotography

This is all I got come up on a white page.

{
    "value": "<option   value=\"1\">Photo Prints<\/option>"
}

Quote from: GJC Web Design on March 04, 2020, 22:41:12 PM
what do u see when u try the catlist url?

https://yoursite.com/administrator/index.php?option=com_virtuemart&view=product&type=getCategoriesTree&virtuemart_product_id=XXX&format=json&lang=en

should be a clean json representation of the cat options

GJC Web Design

and that is correct .. that is the return from the ajax call for a cat list .. you only have 1 category configured?

look in the console for any other errors

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

RRPhotography

So do I need more than one category to make this work? Because I'm pretty sure it did not work even with the sample data installed!

Studio 42

Verify in your browser console(F12), if you have a javasccript error.

GJC Web Design

no - will work with one cat
You need to debug why the ajax return is not rendering .. as Patrick says .. look in your console
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

RRPhotography

So opened the console and found this, dont actually know what it's all about to be honest. but the extension was a chrome telephone extension which I removed, but it's still not working. I have tried Firefox which is installed on my laptop and never ever use it and it's doing it on there also.

JQMIGRATE: Migrate is installed, version 1.4.1
/administrator/index.php?option=com_virtuemart&view=product&type=getCategoriesTree&virtuemart_product_id=1&format=json&lang=en:1 Failed to load resource: the server responded with a status of 503 (Service Temporarily Unavailable)

DevTools failed to parse SourceMap: chrome-extension://kpiopepamhnnileoefikeakookcblmpc/jquery/jquery.min.map

chosen-sprite@2x.png:1 GET http://www.ryanraymond.co.uk/components/com_virtuemart/assets/css/chosen-sprite@2x.png 404 (Not Found)

After removing that extension I am now left with the following:

JQMIGRATE: Migrate is installed, version 1.4.1

/administrator/index.php?option=com_virtuemart&view=product&type=getCategoriesTree&virtuemart_product_id=1&format=json&lang=en:1 Failed to load resource: the server responded with a status of 503 (Service Temporarily Unavailable)

chosen-sprite@2x.png:
1 GET http://www.ryanraymond.co.uk/components/com_virtuemart/assets/css/chosen-sprite@2x.png 404 (Not Found)

Does that make any sense to you guys?

Many thanks for taking the time guys it's much appreciated.

RRPhotography

Sorry guys just expanded one 503 error and seen this information which may help:

GET http://www.ryanraymond.co.uk/administrator/index.php?option=com_virtuemart&view=product&type=getCategoriesTree&virtuemart_product_id=1&format=json&lang=en 503 (Service Temporarily Unavailable)
send @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
ajax @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
Virtuemart.loadCategoryTree @ ajax_catree.js?vmver=2433cbb6:46
(anonymous) @ index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=1:97
u @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
fireWith @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
ready @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
_ @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2

When clicking the Ajax link I get this: (sorry that's a shed load of code there!) Couldn't paste it all as it was to many characters.

/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){var n=[],r=e.document,i=n.slice,o=n.concat,a=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,f={},d=function(e,t){return new d.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,h=/^-ms-/,g=/-([\da-z])/gi,m=function(e,t){return t.toUpperCase()};function v(e){var t=!!e&&"length"in e&&e.length,n=d.type(e);return"function"!==n&&!d.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}d.fn=d.prototype={jquery:"1.12.4",constructor:d,selector:"",length:0,toArray:function(){return i.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:i.call(this)},pushStack:function(e){var t=d.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return d.each(this,e)},map:function(e)

RRPhotography

This is the code it's pointing too, again not sure of it's any help.

jQuery.ajax({
      type: 'GET',
      url: Virtuemart.vmSiteurl+Virtuemart.adminSuffix+'index.php',
      cache: 'false',
      data: Virtuemart.ajaxCategoryUrl,
      success:function(json){
         jQuery('select#'+id).switchClass('chzn-done','chzn-select');
         jQuery('select#'+id).html('<option value=\"\">'+Virtuemart.emptyCatOpt+'</option>'+json.value);
         jQuery('[data-vm="ajax_cat_load"]').remove();
         jQuery('select#'+id).chosen();
         Virtuemart.stopVmLoading();
      }

Studio 42

When you are logged in on loading this URL. What is the result ?
Before you said that you get back an option
{
    "value": "<option   value=\"1\">Photo Prints<\/option>"
}
But now you see a 503 ?
You can try to clear all the cache in Joomla to get last result.
If you use a CDN, try to disable it.

RRPhotography

I click and open the product and see the spinning loading sign next to Categories.

I cleared Joomla cache including the 6 cached files for VM, No CDN loaded, went back to the product and the spinning Loading was on categories, opened up the link you sent and got the same message:

{
    "value": "<option   value=\"1\">Photo Prints<\/option><option   value=\"2\">Photo Prints Un-Mounted<\/option>"
}

I opened the Console and it looks the same information.

jquery.min.js?5c393c738941294f7804db52b56d4b8c:2 GET http://www.ryanraymond.co.uk/components/com_virtuemart/assets/css/chosen-sprite@2x.png 404 (Not Found)
ze @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
css @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
get @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
css @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
(anonymous) @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
Q @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
d.fn.<computed> @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
h.set_up_html @ chosen.jquery.min.js?vmver=2433cbb6:1
c @ chosen.jquery.min.js?vmver=2433cbb6:1
h @ chosen.jquery.min.js?vmver=2433cbb6:1
(anonymous) @ chosen.jquery.min.js?vmver=2433cbb6:1
each @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
each @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
chosen @ chosen.jquery.min.js?vmver=2433cbb6:1
(anonymous) @ products.js?vmver=2433cbb6:34
u @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
fireWith @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
ready @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
_ @ jquery.min.js?5c393c738941294f7804db52b56d4b8c:2
jquery.min.js?5c393c738941294f7804db52b56d4b8c:2 GET http://www.ryanraymond.co.uk/administrator/index.php?option=com_virtuemart&view=product&type=getCategoriesTree&virtuemart_product_id=1&format=json&lang=en 503 (Service Temporarily Unavailable)



Quote from: Studio 42 on March 05, 2020, 14:20:43 PM
When you are logged in on loading this URL. What is the result ?
Before you said that you get back an option
{
    "value": "<option   value=\"1\">Photo Prints<\/option>"
}
But now you see a 503 ?
You can try to clear all the cache in Joomla to get last result.
If you use a CDN, try to disable it.