Closed (fixed)
Project:
Field Group Layout
Version:
2.0.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2024 at 17:27 UTC
Updated:
8 Sep 2024 at 23:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
matsbla commentedThank you for the feedback, can confirm the issue. Am attaching a screenshot as reference.
Comment #3
redndahead commentedAttached is a patch that seems to fix this issue. It checks the parent wrapper and if it's format type is layouts type it will disable dragging. I have tested it under tabs and with nesting layouts.
Comment #4
redndahead commentedComment #5
matsbla commentedThanks for the effort, it works better, but still if you would manage to drag a group inside the layout groups they will now still not be movable anymore. Perhaps we also need to check if it is a layout col-element.
Comment #6
redndahead commentedI'm running into big issues when you add a group element like you did. It changes the format from layout_region to something else. It don't think it has anything to do with this issue, but a problem when it reorders the items when you insert a new one. I'm not sure if that issue is with the field_group module or this module.
I'm attaching another patch that will only disable items that have their format set to layout_region. This will at least guarantee we won't affect other field group types.
Comment #7
matsbla commentedOh, could you perhaps try open an issue and provide clear descriptions of what happens and perhaps step to reproduce?
For the updated patch I tested it, but when applying it the layout col-element now becomes draggable again.
Comment #8
redndahead commentedI'll try and do my best to explain this.
When you create a new field group layout it sets the format type to layout_region. The problem is there is no format type called Layout Region. So it sets the field to the first item in the list. In my case it's tabs. You can see in the screenshot below that it's not draggable, but the layout is incorrect.

The next time you save it will set the region to be the tabs format and it will be draggable again.
My solution is to create a new FieldGroupFormatter called Layout Region. This will make it so the default formatter after creating a new field group layout will be Layout Region and not tabs. Then when you save it will stick. The patch is attached.
This does bring up the question of why does this module have a FieldGroupFormatter called Default. Maybe this is what was supposed to be used for the regions, but I think Layout Region makes more sense.
Comment #9
redndahead commentedAdding Patch
Comment #11
matsbla commentedPerfect, thank you!
Comment #12
matsbla commentedComment #13
matsbla commentedOne follow-up issue #3470175: Remove layout regions from formatter list