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.

Command icon 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

Matroskeen created an issue. See original summary.

matroskeen’s picture

Status: Active » Needs review

The MR is ready for review

owenbush made their first commit to this issue’s fork.

owenbush’s picture

Status: Needs review » Reviewed & tested by the community

Thank 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.

  • owenbush committed 7bfd5f4 on 2.0.x authored by Matroskeen
    Issue #3321550 by Matroskeen: Consecutive Event field widget reloads the...

  • owenbush committed d0ae154 on 8.x-1.x authored by Matroskeen
    Issue #3321550 by Matroskeen: Consecutive Event field widget reloads the...
owenbush’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for this work, this has been merged into the latest dev releases.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.