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.
- The node Template local task, built in
RenderHooks::alterBuiltLocalTasksfromUrl::fromRoute('entity.entity_view_display.node.default', ...), points at the node's default view display instead of the full one. - The Default view display form is no longer redirected to the Drupal Canvas template for full.
FormHooks::alterEntityViewDisplayEditFormshimsdefaulttofullfor nodes before looking up acontent_templateentity, and when one exists it hides the display form and offers a button through to the Canvas template editor.
Steps to reproduce
- Install Drupal CMS with the Varbase Starter site template, without the dropped patch.
- Open any node and look at the Template tab.
- 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
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 #4
rajab natshah✅ 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.