I have a custom module which provides a form, where I am using a popup date selector. When the form is rendered, I get the following errors from required_by_role:
Notice: Undefined index: #field in required_by_role_date_popup_process_alter() (line 58 of /Users/myself/Projects/required_by_role/required_by_role.date.inc).
Notice: Undefined index: #instance in required_by_role_date_popup_process_alter() (line 57 of /Users/myself/Projects/required_by_role/required_by_role.date.inc).
Attaching a patch to wrap these in an if statement; if the date widget is not being used in a field form input, then required_by_role settings don't apply.
Comments
Comment #1
micromegas commentedComment #2
micromegas commentedComment #3
lord_of_freaks commentedHi @micromegas
Thanks for the feedback and the patch.
Could you add an example of the form you are building (at the the part with the date field) in order to be able to create a test for this behavior?
Regards
Comment #4
micromegas commentedThis should be a good simplified example:
Comment #5
lord_of_freaks commentedHi Micromegas
Thanks for the feedback, the bug was already fixed and commited in:
http://cgit.drupalcode.org/required_by_role/commit/?id=0ddb2a665df5b11dd8a7f7cff19805803117d534 and
http://cgit.drupalcode.org/required_by_role/commit/?id=0eeb53a96f14916f2074f1ccb3764c485a94e8e3
It will be available in the next release (hopefully today)