HI Nigel
I have resolved that error, sorry about that. WC Blocks plugin update caused it. I have temporarily renamed it.
There are only ever maximum 2 versions of each ad. Personally from a database point of view, I don't like that we are forced to create a language duplicate post just because we need translations, but I was informed way back 2-3 years ago when we started developing with Toolset/WPML/WordPress that that was how WPML worked, by creating language duplicate posts. Why WPML can't just read translations from a translation table on a database and display those to users of various languages seems strange to me, since it seems very inefficient storing and copying all the post contents and media for each language, but that's a whole other issue! 🙂
So what should happen (and what IS happening at the moment):
Nanny Ads
- When we create a Nanny Ad (CPT nanny-ad) in English, a German WPML duplicate post is created on Toolset form submission.
- When we create a Nanny Ad (CPT nanny-ad) in German, an English WPML duplicate post is created on Toolset form submission.
Job Ads
- When we create a Job Ad (CPT job-ad) in English, a German WPML duplicate post is created on Toolset form submission.
- When we create a Job Ad (CPT job-ad) in German, an English WPML duplicate post is created on Toolset form submission.
In the context of this ticket, for just, say, Nanny Ads:
- A user creates a Nanny Ad in English with location = "Cologne, Germany".
- My first expectation would be that coordinates of "Cologne, Germany" are stored for that field.
- My second expectation would be those coordinates be replicated to the German WPML language duplicate post which is created.
- My third expectation would be that it should not matter if a user searches for "Cologne, Germany" (English) or "Köln, Deutschland" (German), "Colonia, Alemania" (Spanish) or whatever other language a user's computer is set to, the results should still return the location of Cologne in Germany, since I would presume that Toolset Maps is searching based on coordinates and not name strings. In other words, the location search should not be dependent on what language the user is searching in.
Our customers are international people from different countries, and their computers (and therefore probably their browsers) are set in different languages, so if someone is searching from Brazil before coming to Germany, they might enter "Colónia, Alemanha" to search, but the Ads created originally with "Cologne, Germany" should not be excluded from search results.
A second point:
I believe that Toolset IS working well with locations and IS storing the locations as coordinates, (but I can't confirm this - you would know better), since it appears to work in MOST cases for us. However I believe the source of the issue could be with the Toolset Map cache.
A third point to reduce confusion:
Only CPT Nanny Ads are to be shown in search "Find a Native Nanny" and only CPT Job Ads are to be shown in "Find a Job", which is currently the case. I realise the Ads look very similar, but they are not the same, and there are not FOUR versions of each post, rather only TWO, one original language post and one WPML language duplicate post.
Sorry for the long winded-explanation, but I hope it provides clarity.
If you need any further info, please don't hesitate to reach out.
Kind regards
Simon