Steps to reproduce:

1.- Adding multiple fields < 10 fields combined as paragraphs and normal fields separated by tab groups

2.- Try to group all tabs into a tab group (Horizontal or Vertical)

3.- Save it and you will see is loading forever or depending on your php settings regarding the maximum_execution_time you will see the php error.

Comments

acidaniel created an issue. See original summary.

philsward’s picture

I can confirm this is an issue, and after setting the max execution to 120 seconds, I receive an internal 500 error. Form Display becomes completely unresponsive, requiring an uninstall of Field Group or deletion of the content type.

Drupal 8.2.6
PHP 5.6
Maximum execution time of 20 seconds exceeded in /home/user/public_html/t/sandbox/sandbox.site.com/core/modules/field_ui/src/Element/FieldUiTable.php on line 62**

** The line number changes on subsequent refreshes. Probably because the error line number is the code being read at the moment of timeout.

Update: I un-installed and re-installed field group and did some playing around. I managed to create a fairly complex FG nesting of fields, with no issue, so I decided to try re-creating the problem.

What I've found is that nesting a Tab and[or] Tabs within a Tab and[or] Tabs, can cause a problem. no special fields or number of fields are necessary to break it. Initially nesting a tabs within a tab, won't break it. Only if you re-nest the groups, will break it.

To re-create, I had to do the following:

Create groups

1) Create Tab(s)-1 group
2) Create Tab2(s)-2 group

Whether the two groups are a tab and tabs or both a tab or both tabs, doesn't matter. All three conditions will cause the problem.

Move Field Groups

Move both field groups to the very top of the field list on the form display (important)

Nest Field Groups

1) Nest
Tab(s)-1
-> Tab(s)-2
(Save)

2) Nest
Tab(s)-2
-> Tab(s)-1
(Save)

3) Nest
Tab(s)-1
-> Tab(s)-2
(Save)
Timeout Error

It's an odd set of conditions to get the error, but it's still fairly easy to accomplish. I tested with field groups being in the middle of the fields list and couldn't re-produce the error. As soon as I moved the groups to the top and moved from one nesting setup straight to the next, the timeout would happen.

From what I can tell, if you un-nest all of the field groups to the same level and save, then nest in a new order, the timeout doesn't happen. Only if one set of nests is moved directly to a new set of nests.

acidaniel’s picture

acidaniel’s picture

acidaniel’s picture

acidaniel’s picture

It is weird but it seems like if you do the steps to reproduce it the issue only is present when you move the things faster, but if you do it slowly, the issue has go away, seems like it is an issue with the ajax on the weight drag and drop.

bloomt’s picture

This issue is driving me crazy, anyone have a solution?

philsward’s picture

@bloomt
1) Go slow (according to @acidaniel. I didn't test this)
2) Don't nest, then re-nest without first saving
3) Don't add the field groups to the top of the list until you have them nested the way you want

Hope that helps a bit. I was able to create a fairly complex nesting of both Horizontal and Vertical tabs without it crapping out on me, so I know it's possible, you just have to make sure you don't take the steps that will cause the problem, cross your fingers, hold your breath and for good measure, throw a coin into a wishing well.

czigor’s picture

Experiencing the same. Closing #2868005: Recursion WSOD on form/view display in favor of this.

Doing the drag and drop slowly and carefully seems to work.

juankvillegas’s picture

I got today this error and I wasn't able to load the page again. The only solution I found was to disable Field Group (and Field Group Background because of its dependency) loosing all the previous configurations.

  • zuuperman committed 5913be2 on 8.x-3.x
    Issue #2842541 by philsward, zuuperman: Adding Multiple Fields wrapped...

nils.destoop’s picture

Status: Active » Fixed

I could reproduce the error using the steps of philsward. It could occur that the field parent was also set as child, resulting in an endless loop. I added a check on this. Children that are also marked as parent, are now removed as parent.

  • zuuperman committed 6dfe67d on 8.x-3.x
    Issue #2842541 by philsward, zuuperman: Adding Multiple Fields wrapped...
philsward’s picture

Awesome @zuuperman! Is this enough to warrant an rc7 release? It's a pretty big bug that might catch people off guard if they aren't brave enough to run Dev :-/

juankvillegas’s picture

I totally agree with @philsward. A new RC would be great.

Status: Fixed » Closed (fixed)

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

emb03’s picture

I am having this issue too. Asking for an rc7 release. I don't know how to fix the database on my own. Referring to: https://www.drupal.org/project/field_group/issues/2207149#comment-10611558

scottsawyer’s picture

I ran into this issue a couple of times, and each time it seems I was moving too fast in the UI.

I was able to fix it without uninstalling / reinstalling by fixing the config and importing.

Basically, if the problem is on the form display, export that display config, and look VERY closely at the config. Likely you will notice little things that are not quite right in the third_party_settings for the field group array.

In my most recent case, a field group that was a child of another field group, listed the parent field group as a child.

example: ( very abbreviated )

third_party_settings:
  field_group:
    group_size_configurations:
      children:
        - group_large_screens
      parent: group_large_screens
      region: hidden
    group_large_screens:
      children:
        - group_size_configurations
        - field_some_field
      parent: group_size_configurations
      region: hidden

fixed:

third_party_settings:
  field_group:
    group_size_configurations:
      children:
        - group_large_screens
      parent: ''
      region: content
    group_large_screens:
      children:
        - field_some_field
      parent: group_size_configurations
      region: content

So, a field group can't be a parent and a child of another field group. I also included the region: hidden, because it should have been region: content. This is where I first messed up, dragging the entire nested field groups from hidden to content. I didn't wait for all of the ajax to catch up ( because I am impatient, and it didn't seem like it was working ).

I exported the config, manually inspected, comparing to a config that worked, made the changes. As soon as I got a valid configuration, everything starts working as expected.

Really, I think this does boil down to a performance issue, especially when moving a lot of field groups at one time. So the solution might include better queuing and processing of the ajax requests. If it takes a long time to process a field group change and a new change is requested before the previous one is set, maybe it should re-evaluate the total request to determine how to manage it.

I am on a 2gb server, with 0 traffic and the site is plenty fast. I haven't looked at what all the module is doing, but it must be pretty database intensive. Maybe there is a more efficient way to run the queries?

(Edited to show the working config )