Problem/Motivation

The patch "fix: #3573589 Activate Full Content view mode for all new content types", carried by vardot/varbase-patches against drupal/drupal_cms_helper, has been dropped (varbase-patches issue #656, PR #657). drupal_cms_helper installs as dev-2.x, a moving branch. An upstream commit rewrote the code around both hunks, the patch stopped applying, and that failed composer require on every Drupal CMS build.

A patch against a moving branch breaks the build whenever upstream moves. A hook does not. The behaviour should be owned by a module instead.

What stops happening now the patch is gone

The drupal_cms_helper 2.x HEAD still carries both pieces in their unpatched form, so the patch was the only source of the changed behaviour and dropping it reverts both.

  1. The node Template local task, built in RenderHooks::alterBuiltLocalTasks from Url::fromRoute('entity.entity_view_display.node.default', ...), points at the node's default view display instead of the full one.
  2. The Default view display form is no longer redirected to the Drupal Canvas template for full. FormHooks::alterEntityViewDisplayEditForm shims default to full for nodes before looking up a content_template entity, and when one exists it hides the display form and offers a button through to the Canvas template editor.

Steps to reproduce

  1. Install Drupal CMS with the Varbase Starter site template, without the dropped patch.
  2. Open any node and look at the Template tab.
  3. Open Manage display for that content type, then the Default view display.

Proposed resolution

VMI should own this. VMI is View Modes Inventory, so which view mode is the real content display for a node is its subject, and it already implements #[Hook('form_entity_view_display_edit_form_alter')] on this very form in src/Hook/VmiHooks.php.

Restore both behaviours from VMI. drupal_cms_helper is not and must not become a VMI dependency, so VMI has to be a no-op when that module is absent. The implementation and its trade-offs belong in the merge request.

Related: https://www.drupal.org/i/3573589, the upstream issue whose fix would eventually make this unnecessary.

Remaining tasks

  • ✅ Restore the Template local task so it points at the full view mode
  • ✅ Restore the Default view display behaviour for nodes
  • ✅ Guard every interaction so VMI is a no-op without drupal_cms_helper
  • ✅ Verify on a live Drupal CMS plus Varbase Starter site
  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ✅ Automated unit testing coverage
  • ✅ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Developer Documentation
  • ➖ User Guide Documentation
  • ❌ Reviewed by human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ➖ Release notes snippet
  • ✅ Release

User interface changes

  • The node Template tab and the Manage display Default form on Drupal CMS sites.

API changes

  • None.

Data model changes

  • None.

Release notes snippet

  • N/A

Issue fork vmi-3625672

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

rajab natshah created an issue. See original summary.

  • rajab natshah committed 25d0d04c on 5.0.x
    fix: #3625672 Keep the node default display editable and point the...
rajab natshah’s picture

Version: 5.0.x-dev » 5.0.1
Issue summary: View changes
Status: Active » Fixed

✅ Released vmi-5.0.1

Shipped the fix, the module's first test suite (15 tests across varbase-e2e and PHPUnit) and its first GitLab CI pipeline. Sites on Varbase Patches 11.0.47 or newer need this release, since the patch this replaces was dropped there.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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