Skip Navigation

[Resolved] cred_form_validate hook problem

This support ticket is created 7 years 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 23 replies, has 2 voices.

Last updated by Kostas 7 years ago.

Assisted by: Luo Yang.

Author
Posts
#579758

Hi,

This is with reference to:
https://toolset.com/forums/topic/cred-conditional-submission/

When cred_form_validate hook is used with a cred form to display error messages and to stop form submission, the JS and CSS parts of the cred form are printed twice.

This should be a bug, please check it out.

Thank you,
Kostas

#579793

Dear Kostas,

I assume we are talking about the test you mentioned in post:
https://toolset.com/forums/topic/cred-conditional-submission/#post-579258

I just tried the credentials you provided, it is not valid, I see below error message:
ΣΦΑΛΜΑ: Το συνθηματικό που δώσατε για το όνομα χρήστη otg-support είναι λανθασμένο.

Please check it, and describe detail steps for how and where I can see the problem:
the JS and CSS parts of the cred form are printed twice.
Thanks

#579799

I am sorry about that, how should I send a new pw?

Please go to hidden link
submit the form, then check the source of the page you get (the one with the display_msg).
There are JS and CSS printed twice.

Thank you,
Kostas

#579803

I just enabled the private detail box, please provide the credentials of your website. thanks

#579832

Thanks for the details, I can duplicate same problem, and escalated this thread to our 2nd tier supporters, will update this thread if there is anything news.

#581028

Any news so far?

#581476

Here is hot fix:
https://toolset.com/errata/custom-css-added-twice-when-a-cred-custom-validation-triggers/

Please test it and feedback if it is fixed. thanks

#581716

Hot fix introduced other problem:
When first loads, cred form does not run Custom JS.

#581812

Please let me know if it is fixed or not in your website

#581817

Hello Luo,

No, it is not fixed.
Custom JS is not loaded at all, before or after cred_form_validate is triggered.

Thanks,
Kostas

#581832

Thanks for the feedback, I have tried the solution of this post, it works fine in my localhost,
https://toolset.com/forums/topic/cred_form_validate-hook-problem/#post-581810

Anyway, it is reported, you can wait for the updates from our developers, I will update this thread if there is any news.

#581876

Our developers just fixed the problem, and published the new errata:
https://toolset.com/errata/custom-css-added-twice-when-a-cred-custom-validation-triggers/

And I double tested it in my localhost, it works fine, please test it and feedback if it works for you too. thanks

#581909

Hi Luo,

Yes, this fix works, BUT:
I get the following warnings on all pages except the cred form page.

[25-Oct-2017 09:24:21 UTC] PHP Warning: array_unique() expects parameter 1 to be array, boolean given in /Users/.../wp-content/plugins/cred-frontend-editor/application/controllers/asset_manager.php on line 292
[25-Oct-2017 09:24:21 UTC] PHP Warning: array_unique() expects parameter 1 to be array, boolean given in /Users/.../wp-content/plugins/cred-frontend-editor/application/controllers/asset_manager.php on line 305

Thanks a lot,
Kostas

#581927

There isn't same problem in my localhost, and I checked the test site you provided above, no error message too: can you duplicate same problem in above test site? also point out where and how can I see the error messages, thanks
https://toolset.com/forums/topic/cred_form_validate-hook-problem/#post-579806

#581941

Please enable the private detail box to provide some user credentials, thanks.