Problem/Motivation

Currently, the ViewModeSwitch::getViewModeToSwitchTo() method contains some error-prone code to detect if it is executed in preview context. This was only needed for correct previews (e.g. in paragraphs widget or when configuring a layout via layout builder).

Proposed resolution

Replace current caching functionality of ViewModeSwitch::getViewModeToSwitchTo() with static caching

Remaining tasks

  • Create MR with necessary code changes

User interface changes

n/a

API changes

  • Now obsolete cache.view_mode_switch dependency is removed from view_mode_switch service
  • Now obsolete cache.view_mode_switch cache backend is removed

Data model changes

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

hctom created an issue. See original summary.

hctom’s picture

Issue summary: View changes
hctom’s picture

All necessary changes are done

  • hctom committed 32ef4a8 on 2.x
    Issue #3253659 by hctom: Get rid of preview context detection when...
hctom’s picture

Status: Active » Fixed
hctom’s picture

Status: Fixed » Closed (fixed)