Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all, I've just upgrade this module from 7.x-1.35+3-dev to 7.x-1.37+7-dev and the following issues have happened:
- All my error messages from "FIELD-NAME is a required field" became "This field is required"
- All my error message translations in ITA language have disappeared (ENG is shown instead)
Why?
How can I restore the situation?
Thank you very much for helping me
Comment | File | Size | Author |
---|---|---|---|
#20 | Fixed_error_messages_on_ajax_forms-1896426-19.patch | 3.54 KB | alexey.gorb |
Comments
Comment #1
Jelle_SMy mistake, I noticed it, fixed it, but forgot to commit it apparently :s
Committed to latest dev, thanks for the report!
Comment #2
Jelle_SComment #4
jramby CreditAttribution: jramby commentedI've installed the latest dev "7.x-1.37+18-dev" the problem is always there... it disappears after a cache clear but comes back after some error messages shown...
Thank you very much.
Comment #5
attiks CreditAttribution: attiks commented#4 on the same field? with the same user? Can you provide more details so we can reproduce this?
Comment #6
jramby CreditAttribution: jramby commentedYes, on the same pages and fields, with the same user, and the same forms... I don't know exactly when does "This field is required" error message comes back but after several page reloadings and several blur actions...
Thank you for answering.
Comment #7
jramby CreditAttribution: jramby commentedCan anybody reproduce this error, or am I the only one still getting this error ?
Comment #8
jramby CreditAttribution: jramby commentedI'm watching to this right now in my site, ... And I noticed that i forgot to mention that I'm showing my forms in a colorbox overlay... I enable it as a block and showing it with colorbox providing a full node view to its block...
After closing the form (colorbox) I can't get the right error message anymore... so I think, the problem is related to this... can anybody explain... or see what's wrong in what I've done?
Thanks,
Jramby
Comment #9
attiks CreditAttribution: attiks commenteddo you have the same problem without the colorbox?
Comment #10
jramby CreditAttribution: jramby commentedWithout colorbox there is no closing action.. so, I don't know how to check without colorbox... I think the error can't be shown without the close action.
Thanks for your time.
Comment #11
jramby CreditAttribution: jramby commentedI found a quick and maybe dirty solution... please tell me if there is something that might be broken after this change...
I've commented out the line
delete rule.messages
and then my messages didn't came back to "This field is required" anymore...Wish it would be the solution.
Thanks.
Comment #12
jramby CreditAttribution: jramby commentedI see my mistake.... by deleting this the whole clientside validation of the whole form on submit is broken... :( what should I do to make the two works... even just for a quick solution.
Again, thanks
Comment #13
attiks CreditAttribution: attiks commented#12 I understand your problem, but we need to first figure out if the problem is related to colorbox or not.
Where is your form coming from: webform, custom, other?
How is the form loaded into colorbox?
Why can't you test it without colorbox?
Comment #14
jramby CreditAttribution: jramby commentedThe form is "coming from" webform.
I'm using the colorbox-inline class to call the webform block to be shown as a lightbox.
I can test it without colorbox, but the problem is shown when I'm closing the colorbox lightbox.
When I load webform forms on colorbox for the first time, it is showing correctly with the right validation error messages (they are shown greatly in french with the right label).
When I close the colorbox and reopen this same or any other webform forms on colorbox, errors are shown in English and field label are missing.
I'm using Webform 7.x-4.0-alpha6+1-dev, Clientside Validation 7.x-1.37+18-dev.
Thanks.
Comment #15
attiks CreditAttribution: attiks commentedSo the problem is caused by the use of colorbox, do you get any errors (js) the second time?
Comment #16
jramby CreditAttribution: jramby commentedNo, I don't get any error at any time... (js or not js)... no error.
Comment #17
attiks CreditAttribution: attiks commentedDo you get the error after submitting the form as well, or only after closing? Or does the submit a redirect?
Comment #18
jramby CreditAttribution: jramby commentedAfter submit, there is a page loading (redirect or load another page... or even reloads the same page... ), though, after load the validation error messages are allright again.
After closing colorbox there is no page loading... just errors becoming broken...
Comment #19
attiks CreditAttribution: attiks commentedI don't hqve time to debug this now, but you can try looking at what is happening after colorbox is closed, are al drupal.settings still the same, is the behaviour of clientside validation called, ....
Comment #20
alexey.gorb CreditAttribution: alexey.gorb commentedGuys, I've done some investigation and found that there are multiple sources of this issue.
So, I'm attaching a patch with the described changes so you can review and test =)
Comment #22
Jelle_SFixed in latest dev version. Thanks for the patch!