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
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
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
I just enabled the private detail box, please provide the credentials of your website. thanks
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.
Hot fix introduced other problem:
When first loads, cred form does not run Custom JS.
Please let me know if it is fixed or not in your website
Hello Luo,
No, it is not fixed.
Custom JS is not loaded at all, before or after cred_form_validate is triggered.
Thanks,
Kostas
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.
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
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
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
Please enable the private detail box to provide some user credentials, thanks.