Closed (fixed)
Project:
Claro
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2019 at 15:59 UTC
Updated:
25 Jun 2019 at 20:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
volkerk commentedAdded watchdog in alter function.
Comment #3
lauriiiMaybe we could just simplify this to simple boolean comparison:
if (!$dummy_dropbutton) {Comment #4
volkerk commentedOkay
Comment #5
eli-tWith respect to the patch in #4; whilst I'm normally keen on early returns, this feels a little odd in a function that modifies variables passed by reference, especially where we have already made changes to $form.
It is also possible that in the future, futher actions are required in the claro_form_view_edit_form_alter(), to be processed after the block that starts
if (!empty($form['displays'])) {This would not be reached if we hit theif (!$dummy_dropbutton)early return condition and could lead to a subtle source of bugs.Therefore I recommend that instead of
we have something more like
Comment #6
volkerk commentedUse nesting instead of early return as Eli-T suggested.
Comment #7
eli-tThis looks awesome now. I've tested with and without the patch and confirm that this fixes the issue, and the change requested in #5 has been implemented.
Therefore moving to RTBC.
Comment #9
lauriiiLooks good! Thank you! Committed and pushed!