[Computed Content]: Validate view during import

Created on 7 September 2023, 10 months ago
Updated 11 June 2024, 16 days ago

Problem/Motivation

The computed_content entity for views is being created by the display handler's validate function. But that's not called during config import, so we need to provide an event subscriber that does the job.

Proposed resolution

The code would be something like this:

use \Drupal\views\Entity\View;
$v=View::load("digsig_products");
$v->getExecutable()->setDisplay("digital_signage_1");
$d=$v->getExecutable()->getDisplay();
$d->validate();'

We have to loop through all displays in a view and call validate on those that are using the digital signage display handler.

πŸ“Œ Task
Status

Fixed

Version

2.5

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024