Skip Navigation

[Resolved] Data don't save properly when using email custom field and validation

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 17 replies, has 3 voices.

Last updated by Minesh 3 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1812057

I am trying to:
create a email field in one of my custom post types that is both have validation and required.
Link to a page where the issue can be seen: Right now just in admin area

I expected to see: The field validate the data and saves it

Instead, I got: The systems saves the post but does not store any data from that field.

It saves data if validation is disabled. The bug occurs when validation is enabled.

/Henrik

#1812265

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Do you get any validation messages at the top of the edit screen about invalid email addresses?

The validation of the email address field doesn't just check that the email address "looks" valid, it checks that the domain actually exists.

So if I were to try to add the address info@nosuchsiteexists.com, even though it looks like a valid address it isn't, and so it would be rejected.

What's an example of the email address you are trying to save?

#1813359

Hi Nigel!
Thanks for answering! You are right, this site I'm developing has dummy text "inside" so most of the email addresses are dummy ones. When I used "info@gmail.com" it saves the post correct but then I'm using a dummy email address "info@ghfghfghf.com" in a new post, the system saves the post but it does not give me a heads up that something is wrong.

Is it a javascript problem?

I have tried to save posts in Firefox, Edge and Chrome - same behaviour it saves the post without email address if it is not a valid domain. If the email address has a valid domain the system saves it properly. If I leave the field blank the system won't save and gives me an error message.

If you edit a post with from a correct email address with a valid domain to a made up one like "info@ghfghfghf.com". It looks like the system saves the post but the email address won't change neither no error message is showing.

If you like you can take a look inside. Please let me know if you would like login details.

Regards Henrik

#1813713

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I just checked with my test site where I've added the email field which I set to be required as well as validated.
=> hidden link
[You should check the stud-email field]

Then, I've try to create a new post and I can see the email you shared info@ghfghfghf.com does get saved:
=> hidden link

You can access my test site: hidden link
User: demo
pwd: Admin@999

Do you see any different setting you are using compare to what you can see on my test site?

#1814997

Hi
We have see same settings but my system does not save the post with a "random" email or show an error message if the domain is not valid. It just saves an empty email filed.

I have also problems to make conditional cred input fields to show. Maybe that error derives from this problem?

I checked all the version numbers of the plugins and they are up to date.

/Henrik

#1815029

Hi again
I hope you don't mind but I tried to do a conditional cred form on your test site and it worked. (post type föreningar). Same settings in custom fields/post form but a different system.

If you like you can take a look inside. Please let me know if you would like login details.

regards Henrik

#1816509

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes, please.

Can you please send me problem URL where email field is not working as well as access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1818893

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

That do you think about the problems regarding conditional fields in cred post forms? Shall I make an other ticker for that?
==>
Yes, thats a different issue, you should open a new ticket for that.

Regarding email field not get saved, I wonder why custom email field with the same settings is working with my test site and not yours.

Can I take a duplicator copy of your site and then I will deploy it on my local machine and check if I see the same issue as you.

#1818907

Yes. Do that. My site is a long way to be fully operational so take a copy of it.

Do I need to do something before you can do the copy?

regards Henrik

#1818981

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

i've escalated your issue for further investigation as I do not able to see the issue but on of our team member does.

I'll keep you posted.

#1826345

Hi

Is it okey to develope the site (studentumea.se) further and delete some of the parts that caused of the problems mention above?

I have a copy of an other toolset site on an other domain where the data saves correctly (or an error message pops up when you do wrong). I would like to try to take a duplicator copy and see if it works on this domain (studentumea.se)

The strange thing is that both the domains lay on the same server (same ip address)

/Henrik

#1826851

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

For cross verification you can try and check if that help you to find out any other thing other than we know currently.

There could be no side effect if you develop the site further as its just the validation and email is not get saved if there is no valid domain given so issue will be limited to that email field only, i dont think it will affect other parts on your site.

#1827149

Hi
I will try to migrate though duplicator the whole site from the domain that is ok to studentumea.se to see if it works.

If it does not work then we now it is something with the server settings (or the settings for that particular domain ) obviously it is on the same server.

I save the "bad one" also as a duplicator copy

/Henrik

#1828117

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok.

Please let me know how it goes.

#1828201

Hi

Everything is working well. So my issue is resolved but we don't know why it didn't work in the first place.

You can check it out here, hidden link

I have made it accessible for guests. I will take it away tomorrow.

Shall I close this ticket or would you like to investigate more?

/Henrik