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

Issue fork drupal-2935999

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett created an issue. See original summary.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tim.plunkett’s picture

Component: layout.module » layout_builder.module

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tim.plunkett’s picture

Title: Discuss removing Layout Builder's hard dependency on Field UI » Remove Layout Builder's hard dependency on Field UI
Status: Active » Needs review
Issue tags: +Needs issue summary update
FileSize
36.79 KB

This still needs discussion and thought, but here's a patch in the meantime.

Status: Needs review » Needs work

The last submitted patch, 6: 2935999-no_field_ui-6.patch, failed testing. View results

vijaycs85’s picture

We are hitting this problem in one of our projects. Will keep an eye on this issue. Happy to help with reviews/manul testing.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

matthieuscarset’s picture

Priority: Normal » Major

Following this issue too and tagging it as major.

IMHO layout_builder dependency to field_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.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

ptmkenny’s picture

Issue summary: View changes
tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
42.31 KB

Starting from scratch with just test fixes.

Status: Needs review » Needs work

The last submitted patch, 13: 2935999-field_ui-13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
35.4 KB
9.84 KB

Two more fixes, and removed some out-of-scope changes.

johnwebdev’s picture

Status: Needs review » Needs work

Why do we have the 'Needs issue summary update' tag? I think the current description is clear enough.

Manually testing:

  1. Installed Drupal core, Standard
  2. Installed Layout Builder
  3. Enabled Layout Builder and Overrides on Basic page
  4. Uninstalled Field UI
  5. Created a new node (Layout Builder renders fine)
  6. Went to the layout override for the newly created node, and tested adding section, block, revert...

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.

tim.plunkett’s picture

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

larowlan’s picture

FileSize
35.12 KB

If you need this on 8.9.x, here's a patch

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

minorOffense’s picture

Here's a reroll of 15 to update the patch to apply to 9.1.x still.

larowlan’s picture

Status: Needs work » Needs review
FileSize
677 bytes
35.09 KB

Status: Needs review » Needs work

The last submitted patch, 21: 2935999-21.patch, failed testing. View results

larowlan’s picture

tim.plunkett’s picture

Status: Needs review » Needs work

Thanks @larowlan! Looks good.

Still needs work per #17.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kim.pepper’s picture

Issue tags: +#pnx-sprint
tim.plunkett’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests, -#pnx-sprint

Last commit addresses #16.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

matteo.borgognoni made their first commit to this issue’s fork.

matteo.borgognoni’s picture

Re-roll patch for 9.2.x

matteo.borgognoni’s picture

Status: Needs review » Needs work

The last submitted patch, 33: 2935999-field_ui-9.2.10-2.patch, failed testing. View results

tim.plunkett’s picture

Status: Needs work » Needs review

Rebased the branch. Hiding the patches since we're using an MR.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

aarti zikre’s picture

Reviewing this

aarti zikre’s picture

Verified 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

2022-07-19/Screenshot from 2022-07-19 11-57-23.png

Better to have another review

rodrigoaguilera’s picture

@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

rodrigoaguilera’s picture

Status: Needs review » Reviewed & tested by the community

I 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

tim.plunkett’s picture

Rebased the MR for 9.5.x

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed a849aca4e7 to 10.1.x and 088cfe36cf to 10.0.x and dc1441d339 to 9.5.x. Thanks!

  • alexpott committed a849aca on 10.1.x
    Issue #2935999 by tim.plunkett, larowlan, johnwebdev, ptmkenny: Remove...

  • alexpott committed 088cfe3 on 10.0.x
    Issue #2935999 by tim.plunkett, larowlan, johnwebdev, ptmkenny: Remove...

  • alexpott committed dc1441d on 9.5.x
    Issue #2935999 by tim.plunkett, larowlan, johnwebdev, ptmkenny: Remove...

Status: Fixed » Closed (fixed)

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

RumenDamyanov’s picture

FileSize
2.33 KB

Here's a re-roll of the patch to apply to 9.4.x.

afaouki’s picture

Patch remove Layout Library dependency on FieldUI::getRouteBundleParameter() method