Problem in Country Dropdown
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Problem in Country Dropdown
Hello,
the country dropdown of the customer maintenance does not work anymore. Message in the browser is:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://restcountries.eu/rest/v2/all?fi ... 2Code;name. (Reason: CORS request did not succeed).
I tried to open the restcountries.eu site, but this doesn't respond, either.
In https://github.com/aimeos/ai-admin-jqad ... s/admin.js , I see that the method getCountries is marked as @deprecated 2022.01
How can I make this working, again?
Claudia
the country dropdown of the customer maintenance does not work anymore. Message in the browser is:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://restcountries.eu/rest/v2/all?fi ... 2Code;name. (Reason: CORS request did not succeed).
I tried to open the restcountries.eu site, but this doesn't respond, either.
In https://github.com/aimeos/ai-admin-jqad ... s/admin.js , I see that the method getCountries is marked as @deprecated 2022.01
How can I make this working, again?
Claudia
Re: Problem in Country Dropdown
https://restcountries.com/v2/all?fields=alpha2Code,name
seems to be the new URL
seems to be the new URL
Re: Problem in Country Dropdown
I changed this in my local code and it fixes the problem.
Re: Problem in Country Dropdown
In 2020.10 and later, the problem has been fixed by using a local list of countries instead of asking a REST API for that information.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Re: Problem in Country Dropdown
Do you mean 2020.10 and later? Only I cant see the changes that reflect this.
https://github.com/aimeos/ai-admin-jqad ... #L132-L168
https://github.com/aimeos/ai-admin-jqad ... #L132-L168
Re: Problem in Country Dropdown
The JS method is still there for backward compatibility but the country drop-downs are now populated from confiugration:
https://github.com/aimeos/ai-admin-jqad ... #L335-L348
Keep in mind that you need to adapt your own templates if you've overwritten the Aimeos ones.
https://github.com/aimeos/ai-admin-jqad ... #L335-L348
Keep in mind that you need to adapt your own templates if you've overwritten the Aimeos ones.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 72
- Joined: 22 Mar 2021, 16:56
Re: Problem in Country Dropdown
I should have checked the template, thank you