Hi @lorro
I hope you’re well today and thank you for contacting us!
I admit I didn’t come across this issue yet but a closer look at the related code suggests that it’s related to date format settings. By this I mean specifically “configuration” rather than data submitted by member.
The function that returns bool that’s later used and reported by “date_format()” is meant to convert between standards of date formatting. Ultimately, it takes format from set/given format or – as a fallback – from WP settings.
For some reason, this fails “somewhere on the way” and I admit I’m not yet sure why. I tried to replicate this but to no luck.
For now, I’d like to ask you to start with two simple steps:
1. edit your date picker field on the form and change date format in its settings, apply it and update the form; then clear all cache on site if there is any; then change the format back, apply and update and again clear cache.
If this doesn’t solve the issue
2. try the same process (change, save, change back, save) with date format set in your WordPress on “Settings -> General” page.
I’m suggesting this because it’s possible (I’ve seen such cases) that due to some temporary glitch format settings weren’t correctly saved into DB so I’d like to rule that out.
If that’s not the case, then are you, by any chance, using some non-standard (custom) date format in your WordPress and if yes – what exactly is the format?
Kind regards,
Adam
Thank you for your full reply.
I have carried out the steps in 1. above but I will need to wait a couple of days to see if they have had an effect.
My form has 3 date fields, I don’t know if that’s relevant.
The formats I have chosen in form edit are all d-m-Y
My WordPress date format is d/m/Y
Again, not sure if this is relevant, I have been using Forminator for about a year and these warnings have started to appear over the last couple of weeks, the first one was on 15/03/22.
I’m also seeing:
PHP Warning: strlen() expects parameter 1 to be string, array given in /home/solar/public_html/inno-therm/wp-content/plugins/forminator/library/fields/select.php on line 417
in the error log, but there’s only a couple of them.
Hello @lorro
Could you please duplicate the form, strip any sensitive information, export it and share it here with us via a service like Dropbox, GDrive or Pastebin?
https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export
Just so we import it in some testing sites and check if we can further replicate.
Thank you,
Dimitris
I tried 1. from Adam’s post but it made no difference. I’ve done 2. and I’m waiting to see if that does anything.
I put in some debug code just before line 1178. The result was that $date_format is “dd-mm-yy” which looks good, but $data was “Hqsrrvzmhwkyk” which looks completely wrong. I’ve put some more debug code in to see where $data is coming from, but as I’m unable to replicate the problem, I’ll just need to wait for it to recur.
If no-one else is reporting this, it looks like something just from my site. I will keep trying to debug and report back if I find anything.
Hi @lorro
I hope you are doing well.
Please keep us posted, I also suggest running a Full plugin conflict test in case any plugin or theme is conflicting with the Forminator https://wpmudev.com/docs/getting-started/getting-support/#conflict-test
Best Regards
Patrick Freitas
OK, I think I’ve got to the bottom of this with some debugging. Some spammer script is sending post data to the page. The post data is promoting a service which is not related to my site and from a country a long way off. They probably have a script that crawles round the internet for forms and tries their luck. The script half right but its not recogising all the form fields, so the submitted data fails validation. The spam message does not appear in the submissions list.
Does Forminator check that the post data comes from the host site. Anyway, going forward I can safely ignore these warnings.
Hi @lorro
I hope you are doing well.
Thank you for the update.
Does Forminator check that the post data comes from the host site
We do have validations & sanitization, for spam we suggest some extra security layers for example Akismet or honeypot the https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#security
I am marking this as resolved, feel free to ping us any time you need.
Best Regards
Patrick Freitas