Problem/Motivation
Editing event dates with "Consecutive Event" recurring type selected reloads the whole form via ajax, although it seems not necessary.
In our case, we're using multiple tabs provided by Field Group module. "Date" fields are located in one of the tabs, so once we change something in "Consecutive Event", the form is reloaded and active tab is refreshed as well.
Steps to reproduce
1) Install Field Group;
2) In the "Manage form display" add Tabs component and add "Recur Type" and "Consecutive Event" to the 2nd tab;
3) Go to new event page, go to the tab with date fields and trigger ajax reload;
4) You should see the form reload and lose the active tab;
Proposed resolution
I don't get why the ajax reload is necessary, but if it's required, let's refresh only the widget form components.
Remaining tasks
Review and manual testing.
Issue fork recurring_events-3321550
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
matroskeenThe MR is ready for review
Comment #5
owenbush commentedThank you for this issue. The underlying reason the AJAX request is being performed is because with consecutive events it is very easy to create a lot of events and there is a risk that there will be a PHP timeout or memory exhaustion, so the form performs a check to see if that may be the case and will warn editors.
This seems like a good solution to just refresh the component itself though.
Comment #8
owenbush commentedThank you for this work, this has been merged into the latest dev releases.