- Issue created by @johnv
- Status changed to Fixed
10 months ago 3:44pm 28 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.
In version 1.16, the following problem occurs when editing a node with office_hours field
- edit a node with seasons and exceptions enabled.
- add a weekday, save, edit again
- press the 'Add another item' to add an exception. No need to actually add an exception. Save.
- See that the weekday data is lost.
This happens since objects are re-used.
The [Add another item] button calls ExeptionsWidget~addMoreSubmit(), which in turn calls $form_state->setRebuild();
Then in ComplexWeekWidget,~formElement(), the last season is used for normal weekdays.
The season must be set/reset explicitly.
Fixed
1.16
Code - widget
Automatically closed - issue fixed for 2 weeks with no activity.