Problem/Motivation
It is considered a best practice to disable UI modules (Field UI, Views UI) on production. However, since Layout Builder has a hard dependency on Field UI, it makes it impossible to use layouts created with Layout Builder and keep Field UI disabled on production.
Proposed resolution
Rewrite Layout Builder so that layouts can be created/edited when Field UI is enabled, but can still be used (although not created/edited) when Field UI is disabled (for example, on production).
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#48 | Remove_layout_builder_dependency_on_Field_UI.patch | 3.04 KB | afaouki |
#47 | 2935999-47.patch | 2.33 KB | RumenDamyanov |
#38 | Screenshot from 2022-07-19 11-57-23.png | 9.3 KB | aarti zikre |
Issue fork drupal-2935999
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
tim.plunkettComment #6
tim.plunkettThis still needs discussion and thought, but here's a patch in the meantime.
Comment #8
vijaycs85We are hitting this problem in one of our projects. Will keep an eye on this issue. Happy to help with reviews/manul testing.
Comment #10
matthieuscarset CreditAttribution: matthieuscarset as a volunteer and commentedFollowing this issue too and tagging it as major.
IMHO
layout_builder
dependency tofield_ui
is a blocker. Drupal websites should not have the Field UI module enabled in production - except some very specific usecases where you allow users to alter website's structure live.Comment #12
ptmkenny CreditAttribution: ptmkenny commentedComment #13
tim.plunkettStarting from scratch with just test fixes.
Comment #15
tim.plunkettTwo more fixes, and removed some out-of-scope changes.
Comment #16
johnwebdev CreditAttribution: johnwebdev commentedWhy do we have the 'Needs issue summary update' tag? I think the current description is clear enough.
Manually testing:
However, there is a message on the layout override page:
You are editing the layout for this Basic page content item. Edit the template for all Basic page content items instead.
The link ' Edit the template for all Basic page content items instead.' leads to
admin/structure/types/manage/page/display/default/layout
which no longer exists as the module is uninstalled, so we hit a 'The website encountered an unexpected error. Please try again later.'Setting to NW for that.
Comment #17
tim.plunkettThe issue summary _was_ updated, but the tag was not removed. Doing so now.
We need test coverage for #16, but the fix is straightforward. Leaving at NW.
Also I think maybe LB should install Field UI when it is installed.
Comment #18
larowlanIf you need this on 8.9.x, here's a patch
Comment #20
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commentedHere's a reroll of 15 to update the patch to apply to 9.1.x still.
Comment #21
larowlanComment #23
larowlanComment #24
tim.plunkettThanks @larowlan! Looks good.
Still needs work per #17.
Comment #27
tim.plunkettStill NW, but rerolled for #3186661: Remove usage of drupalPostForm. Switched from patches to MR.
Comment #28
kim.pepperComment #29
tim.plunkettLast commit addresses #16.
Comment #32
matteo.borgognoni CreditAttribution: matteo.borgognoni commentedRe-roll patch for 9.2.x
Comment #33
matteo.borgognoni CreditAttribution: matteo.borgognoni commentedComment #35
tim.plunkettRebased the branch. Hiding the patches since we're using an MR.
Comment #37
aarti zikre CreditAttribution: aarti zikre as a volunteer and at QED42 commentedReviewing this
Comment #38
aarti zikre CreditAttribution: aarti zikre as a volunteer and at QED42 commentedVerified for Drupal 9.5.x version
The MR is not working
Testing Step:
* Install new drupal instance.
* Add & fetch this issue fork’s repository
git remote add drupal-2935999 git@git.drupal.org:issue/drupal-2935999.git
git fetch drupal-2935999
* Checkout to 2935999-field_ui branch
git checkout 2935999-field_ui
* load the project
Test result:
Screen got blank
Refer SS
Better to have another review
Comment #39
rodrigoaguilera@aarti zikre
The installation of the new Drupal instance should be with the branch already checked out.
The differences between the Drupal version you used to install and the version in the MR can be quite different.
Also, you should enable error output on your environment so you get more info on what failed
Comment #40
rodrigoaguileraI reviewed the code and the tests makes sense to me. Also tested on a 9.4.3 installation and I was able to render layouts without field ui enabled
Comment #41
tim.plunkettRebased the MR for 9.5.x
Comment #42
alexpottCommitted and pushed a849aca4e7 to 10.1.x and 088cfe36cf to 10.0.x and dc1441d339 to 9.5.x. Thanks!
Comment #47
RumenDamyanovHere's a re-roll of the patch to apply to 9.4.x.
Comment #48
afaouki CreditAttribution: afaouki commentedPatch remove Layout Library dependency on FieldUI::getRouteBundleParameter() method