Problem/Motivation

When using the ds_switch_view_mode module, the layout preview fallback image is a URL rather than a proper render array element.

Steps to reproduce

Log in as a user with permission to switch view mode. Edit content that is set to a layout with no preview icon. Fatal error should be shown.

Proposed resolution

Use similar image preview markup to what is used when a layout is not set.

Issue fork ds-3437746

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

greenSkin created an issue. See original summary.

greenskin’s picture

StatusFileSize
new1.93 KB

Attached patch that implements the proposed resolution.

greenskin’s picture

Status: Active » Needs review

rishabjasrotia made their first commit to this issue’s fork.

swentel made their first commit to this issue’s fork.

swentel’s picture

Status: Needs review » Fixed

merged, thanks!

Status: Fixed » Closed (fixed)

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