I have marked this thread as "Waiting for feedback" status, please update here if you still need assistance for it. thanks
Hi Luo
We are still testing this. We keep finding cases when we are able to store non- German addresses and are trying to understand why and find a reproducible scenario.
Kind regards
Simon
Please provide more details about the problem:
we are able to store non-German addresses and are trying
Which non-German address are you using? can you copy/paste it here?
Hi Luo
Sorry for the delay in the response.
The test address we are using is the Italian town "Taranto", which is well outside the coordinate rectangle we created with the latitude and longitude coordinates.
Kind regards
Simon
Did you test that address "Taranto" in your own website?
I have tried it in your website:
hidden link
I can get the error message: APPROXIMATE LOCATION: Please enter a valid address in Germany
see my screesnhot Taranto.jpg
Please update here when you get detail steps to reproduce the same problem, thanks
Hi Luo
We tested again yesterday and the problem is sporadic - we get the error message only sometimes, not always, particularly in Edit mode (menu My Ads > My Job Ads > Edit Job Ad or My Ads > My Nanny Ads > Edit Nanny Ad). In our testing yesterday it worked only about two thirds of the time. It needs to work consistently 100% all the time.
Kind regards
Simon
Please check my answer above:
https://toolset.com/forums/topic/prevent-toolset-forms-allowing-saving-of-non-german-addresses-with-toolset-maps/page/2/#post-2497897
The URL you mentioned in this thread:
hidden link
It is a post form creating new "job-ad" post, but the issue you mentioned above is another post form for editing "Nanny Ad" post.
It is different issue, can you confirm it? thanks
Hi Luo
The problem was originally reported on our dev.native-nanny.de subdomain. I only duplicated dev.native-nanny.de to test.native-nanny.de because you wanted to debug there.
The problem remains sporadic on dev.native-nanny.de for both Job Ads and Nanny Ads.
Job Ads
New Job Ad: hidden link
Edit Ad: menu My Ads > My Job Ads > Edit Job Ad
Related custom code snippet: function-validate-job-ad-approximate-location
New Job Ad Toolset Form: Post Form - New Job Ad (ID: 929)
Edit Job Ad Toolset Form: Post Form - Edit Job Ad (ID: 931)
Nanny Ads
New Nanny Ad: hidden link
Edit Ad: menu My Ads > My Nanny Ads > Edit Nanny Ad
Related custom code snippet: function-validate-nanny-ad-dev-approximate-location
New Nanny Ad Toolset Form: Post Form - New Nanny Ad (ID: 921)
Edit Nanny Ad Toolset Form: Post Form - Edit Nanny Ad (ID: 923)
As mentioned earlier, you will need to edit the Ad a few times to reproduce the error, as it doesn't ALWAYS occur, however in our testing we noticed the problem turned up a lot more when editing the Ads rather than creating the Ads.
Please let me know if you still need clarification or if the problem is now clear.
Kind regards
Simon
No, it does not help, I have tried the credentials you provided in post:
https://toolset.com/forums/topic/prevent-toolset-forms-allowing-saving-of-non-german-addresses-with-toolset-maps/#post-2479081
There isn't any:
- Edit Ad: menu My Ads > My Job Ads > Edit Job Ad
- Edit Ad: menu My Ads > My Nanny Ads > Edit Nanny Ad
See my screenshot nanny.jpg
Please make sure the steps you mentioned above is valid for debug, then update here
HI Luo
Ah OK, I see what's happening here. You are using an Admin login, and the plugin User menus is hiding those pages in the menu.
Please use the following test logins (please delete these from this post, once you have noted them!):
nativenanny2 / password-removed to sign in as a nanny and create/edit Nanny Ads
nativefamily6 / password-removed to sign in as a family and create/edit Job Ads
Kind regards
Simon
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hi Simon - Luo is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.
I've noted the access details you shared for user "nativenanny2" and "nativefamily6".
Can you please share admin access details as well or tell me what admin access details I can use. (this is to ensure we are on same page and I'm checking on the same dev site).
In addition to that, with the users you shared "nativenanny2" and "nativefamily6" - Can you please share the exact steps that I should follow to see the issue - Once I've all this required details I'm happy to dive in and check whats going wrong with your setup.
I have set the next reply to private which means only you and I have access to it.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
I checked the code Luo shared and I see you have shared the specific range in which we should display the error message:
=> https://toolset.com/forums/topic/prevent-toolset-forms-allowing-saving-of-non-german-addresses-with-toolset-maps/#post-2487647
So, do you men that if $latitude and $longitude falls within the following range:
- if LONGITUDE >= 5.87 AND <= 15.03 (display the error message)
- if latitude >= 47.2 and <=55 (then display the error message)
Does above range is correct or if still have different range to add to?
HI Minesh
The code provided only works some of the time, that's the issue. It doesn't work consistently all the time for Nanny/Job Ads, using the "new" form and "edit" form.
Sometimes it is still possible to enter addresses that don't fall within that range. For example, creating a new Ad, it's SOMETIMES possible to create an Ad with an approximate location in, say, Taranto, Italy. Most of the time the code works, but we still have cases on dev and www where users are able to create or edit Ads using locations that don't fall within the range specified by the code.
During testing, we couldn't figure out any circumstances which cause the code to work sometimes and not others. 🤷🏻♂️
I'll be opening another ticket today regarding the map search, maybe you could pick that one up too (it's a different issue).
Kind regards
Simon
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Ok - its really important for us to know when on what action the issue occurs as without that even for us its really hard to guide you in right direction or without knowing what to fix there would be no solution.
It seems you forget to share the confirmation on my question which I asked with my previous reply:
So, do you men that if $latitude and $longitude falls within the following range?
- if LONGITUDE >= 5.87 AND <= 15.03 (display the error message)
- if latitude >= 47.2 and <=55 (then display the error message)