Problem/Motivation

Move Context mapping to be inside a try/catch to catch MissingValueContextException & ContextException

Same as Drupal\block\BlockAccessControlHandler::checkAccess()

Steps to reproduce

Add an ctools block EntityField to a context reaction - see WSOD when not on a node page.

Proposed resolution

Put $block->access() inside try/catch.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

silverham created an issue. See original summary.

silverham’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.82 KB
guilhermevp’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new60.16 KB

I was able to reproduce the error, and the patch prevents WSOD.

paulocs’s picture

Nice catch @silverham.
Thanks!

paulocs’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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