Closed (fixed)
Project:
Conditional Fields
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2021 at 17:37 UTC
Updated:
8 Sep 2024 at 11:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
prudloff commentedThe attached patch fixes the notice.
Comment #3
andreastkdf commentedHad the same notice for a form widget containing an element that does not have a #name key.
I can confirm too that #2 fixes the notice
Thanks!
Comment #4
maddentim commentedI can also confirm the patch resolves the issue and applies cleanly to the 4.0.0-alpha3 release.
Comment #5
grimreaperHi, Thanks for the patch!
Comment #6
liam morlandComment #7
dqdThanks for the reports and all working on this here! +1
It may solve the issue of the thrown error, but I am not sure if we should leave out ELSE completely here. Now we have IF and ELSE IF and nothing if both are not TRUE. Can somebody confirm that it is harmless and that we do not need a silent exception error or anything else to notify? Or ion other words: do we need #name? If not, why we asking for it then?
Otherwise if somebody can clarify this for me I do not see reasons not to commit. I would commit/merge it asap after another review of my question.
Comment #8
amstercadIn preparation for Drupal 11, please note the test failure of the current patch:
PHP 8.3 & MySQL 8, D10.2 Patch Failed to Apply
Drupal 11 requires PHP 8.3.
Comment #11
scott_euser commentedI took a look at the logic and the subsequent code really does need the #name - if its missing every bit of the subsequent code falls apart as its essentially the key bit to determine the dependee. So it seems safe to me to merge it @dqd
Moved the patch to an MR for ease of merging, but no change so marking as RTBC
Comment #13
dqdOh no, sorry, I missed that one in my notifications. +1 Thanks @scott_euser for clarifying and preparing for merge. Awesome.
@amstercad: this should be solved in one of the Drupal 11 compatibility issues here. At this moment https://www.drupal.org/project/conditional_fields/releases/4.x-dev does not support Drupal 11 yet and so the merge should be made before compatibility issues turn this merge out of sync. I also consider to discuss with other maintainers if we probably move Drupal 11 compatibility temporary to another branch before back porting to not break merging the queue of potentially open and almost fixed issues.