The changes introduced in #2809081: Default profile handling is inconsistent introduce a regression, reverting some good logic introduced in #2799669: Only show "Save" instead of both buttons when first profile.. New profile forms now contain a "Safe and set default" button even when "allow multiple" is unchecked, which makes no sense from a user perspective. New profile forms seem to have isActive() set to true.
Not sure where to fix this - by setting isActive() to false on any new form, or reverting to some of the logic that was previously in place to hide that button when isNew() is true.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | set_default_button_now-2878235-9.patch | 2.88 KB | mglaman |
| #7 | set_default_button_now-2878235-7.patch | 1.85 KB | mglaman |
Comments
Comment #2
mglamanFirst step: Let's write a test to show default button is there
Second step: Hide "Set default" if isNew
Comment #3
dafederComment #4
dafederOK, new to test writing for D8 but will try to create a patch.
Comment #5
mglamandafeder thanks for trying! There's plenty of existing tests, can plug a new assertion into an existing test. You can find my in IRC/Drupal slack and ping for help during the week if you want.
Comment #6
mglamanWorking on test to prove the bug.
Comment #7
mglamanThis test should fail.
Comment #9
mglamanHere is passing patch. This checks if the profile type supports multiple. And we have logic which ensures inactive profiles are never default.
Comment #11
mglaman