Cities addon install

I’m trying to add a city list, but no matter what I do, it doesn’t work.
I previously ran the command line without a database, but I couldn’t connect, so I deleted the cities folder.
I uploaded it again and installed it using the command line, but no matter what I did, it wasn’t reflected.
Can anyone help me?

fn_cities_location_manager_detect_zipcode_post(): Argument #3 ($city) must be of type array, string given, called in //app/functions/fn.control.php on line 123

This error occurs after installation. Previously, this error occurred after installation, so I deleted it.


Please try to apply the fix from the attached .diff and let me know if it helps.
3b6fa7f2ad1cebdbd46565f04967edad4e4d9a46.diff (1.9 KB)

This is same as mine. I have version 4.17.1.
Is the cities addon the same as the state in the profile field?
The database wasn’t updating from the command line, so I added it manually.

I checked again and found that the top part was the same but the bottom part was different. error has been fixed.
And as mentioned above, I’m curious how this works.

I can only assume that there have been some changes in your installation, as the .diff file I’ve provided is for the clean 4.17.2 version, and as this add-on was released in the 4.16.1 version, there have been no changes in the app/addons/cities/func.php file.

thank you :slight_smile:
Should I consider writing from the command line and backend to be the same?

You’re welcome!

I’m afraid the current implementation of the add-on can only be installed via console. Otherwise, the installation may require additional scripting or some (temporary) changes to the core files.

Afterwards, the add-on worked fine and I even added a city to the admin panel, but suddenly it didn’t work

Tygh\Exceptions\DatabaseException: Unknown column ‘cscart_rus_cities.city_id’ in ‘on clause’ (1054)

SELECT COUNT(*) FROM cscart_cities LEFT JOIN cscart_city_descriptions ON cscart_city_descriptions.city_id = cscart_cities.city_id LEFT JOIN cscart_abt__ut2_checkout_cities ON cscart_abt__ut2_checkout_cities.city_id = cscart_rus_cities.city_id WHERE cscart_city_descriptions.lang_code = ‘ko’ AND cscart_cities.country_code = ‘US’

in app/Tygh/Database/Connection.php:1712 Stack trace: #0

I solved problem:)
unitheme compatibility issue

I added a state and city, states dropdown works fine in profile.
but how do I add a city dropdown to profile field?
I can’t add a city in profile.
I can select county and state but not city here.

Yes, I installed it. In accout, the dropdown works for state but not for city.