Error: Call to a member function access() with Site Studio 7.2.1

Created on 2 August 2023, 11 months ago

Problem/Motivation

Installing Acquia CMS with Site Studio 7.2.1, the front page displays the message,

The website encountered an unexpected error. Please try again later.

Steps to reproduce

Install Drupal with Acquia CMS with Site Studio module version 7.2.1

Proposed Solution

Replace code

        $access = $entity->access('view', $this->currentUser, TRUE);
        if ($entity instanceof EntityInterface && $access) {

with

        if ($entity instanceof EntityInterface && $entity->access('view', $this->currentUser)) {
        $access = $entity->access('view', $this->currentUser, TRUE);

at docroot/modules/contrib/cohesion/modules/cohesion_templates/src/TwigExtension/TwigExtension.php

🐛 Bug report
Status

Active

Version

1.5

Component

Code

Created by

🇮🇳India vipin.mittal18 Greater Noida

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

Comments & Activities

Production build 0.69.0 2024