Beee4life / acf-city-selector

An ACF extension to create a new field type, where you can select a city based on country and provence/state.
38 stars 15 forks source link

Doesn't import new city via CSV #132

Open jlb-1985 opened 5 months ago

jlb-1985 commented 5 months ago

Hi,

I found another little problem. I want to import a new city via CSV like this "Theux;LK;Luik;BE;Belgium. After I have done this, it says 'Congratulations, you've imported a new city". But the city is not visible in the list.

I've included a debug report. image

Beee4life commented 5 months ago

Never seen this before, I will check.

Importing is not done through ajax, so wondering why this would pop up

Beee4life commented 5 months ago

Did you make sure you used the correct separator ?

It makes a difference if you use , or ;.

jlb-1985 commented 4 months ago

Yes I did, I used ; I run the debug log manager again and this is the result. It only comes up if the ACF city selector plugin is activated.

image

jlb-1985 commented 4 months ago

Do you know what to do to solve this problem or maybe what I can do?

Beee4life commented 4 months ago

I've been out of the country for a while, will try took look into it asap.

Beee4life commented 4 months ago

The error mentioned for ACF ajax has to do with the value being passed to it. It looks like an array is passed whereas it should be a string, but I can't reproduce it.

I created a csv with 1 line, like yours. Importing it gave no errors and I saw it correctly in the database as well.

When I tried to search for it in the admin, there was a SQL error, so had to optimise those queries first.

I'm working on a new version, which you can download here to test, if you're interested.

I get no errors in this version yet, when importing and searching.

jlb-1985 commented 3 months ago

Hi,

It's working. If I add a city it isn't visible instantly, but it takes some time.

Beee4life commented 3 months ago

Hi, i'm happy to hear that.

I think why it doesn't show immediately can be related to this issue, which I still need to fix.