White screen when accessing JSON-LD representation of node in some circumstances #2039
Labels
Repository:Islandora
Issues pertaining to the repository: https://github.com/Islandora/islandora
Subject: Access Control
related to managing roles and permissions/information security.
Subject: Drupal
related specifically to Drupal, usually pointing somewhere on drupal.org
Subject: Linked Data
related to linked data. Consider also using metadata or modelling tags.
Type: bug
identifies a problem in the software with clear steps to reproduce
PR: Islandora/islandora#862
Steps to Reproduce
In an Islandora site, clone the https://github.com/roblib/islandora_premis module into the modules/contrib folder and check out the 'unpublished' branch. and then enable the module.
Create a new Repository Item object, and uncheck 'Published' before saving.
Append '/premis' to the end of the new object's url, e.g. /node/3/premis.
Expected behaviour
The PREMIS data about the object, represented as Turtle text should be displayed.
Actual output
The message "The website encountered an error" is shown.
Findings
I'm working with a module that sets up a controller endpoint that includes a nid.
As per proper Drupal 8.x+ practise, it has had entity access check in the routing.yml file, e.g.
In islandora.module there is an alter reaction hook that runs context reactions on the JSON-LD normalized array.
Currently it will set a cache tag on the array. However, when entity access check is added, no 'cacheability' array key is set, and the module white screens.
The text was updated successfully, but these errors were encountered: