VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: danielesfera on October 26, 2020, 16:47:17 PM

Title: State menu empty after country selection
Post by: danielesfera on October 26, 2020, 16:47:17 PM
Hi,

I have a strange problem with the states menu in the registration form.
Some customers, few customers, after selecting the country see the menu of the states empty.
I can't understand why, it seems that it is totally random.
The same customers who report this problem are not even able to add products to the cart.
This problem appeared suddenly a few weeks ago, without any changes on the server or updates to joomla or virtuemart.
Website url: https://www.pizzardieditore.com/shop/index.php?option=com_virtuemart&view=user

Daniele

Title: Re: State menu empty after country selection
Post by: GJC Web Design on October 26, 2020, 19:56:51 PM
tested in FF, Chrome and Edge ,,  the provinces are populated

why not make the state non compulsory so this doesn't block the client if some have problems?

with the CAP and city the address is complete
Title: Re: State menu empty after country selection
Post by: danielesfera on October 27, 2020, 17:32:25 PM
I finally found a solution.

The problem was related to an "header CORS "Access-Control-Allow-Origin" error.

For a strange reason the WAF no longer redirected the domain if typed without www., and for customers who accessed the site https://pizzardieditore.com the error did not allow loading the list of states

Bye

Daniele
Title: Re: State menu empty after country selection
Post by: GJC Web Design on October 27, 2020, 19:45:24 PM
then you should force either with or without www

.htaccess

RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]