Closed (fixed)
Project:
Context
Version:
8.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2020 at 01:49 UTC
Updated:
4 Nov 2020 at 00:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
silverham commentedComment #3
silverham commentedComment #5
paulocsHey @silverham,
Can you provide the steps to add the EntityField block to a reaction?
I installed the Chaos Tools Blocks module but I don't know exactly how it works. I see that module prevents the EntityField block to be displayed on viewable block types so I don't know how to use it and what it does exactly.
Comment #6
deaom commentedThis is only changing the order of the code execution, so if access for blocks is still working correctly, I would say commit the patch but without all the unnecessary comments added.
Comment #7
silverham commentedHi @paulocs
How to replicate:
1. Install Drupal 8
2. Install ctools & submodule ctools_block (latest stable - 8.x-3.2)
3. Install context module (latest dev - issue appears in stable as well)
4. Create a context - any condition e.g. path NOT admin/* - with reaction block -> (Block: "ID", Category: "Content")
5. Go to the page which will trigger happen (e.g. homepage or any node page) -> see Error of death
Note that the $block->access() is cached when fixed, so you must clear cache and then go the page with fix removed to see the reaction cause the WSOD again. (if testing a few times)
Comment #8
paulocsHello @silverham,
after I applied the patch, I got the error:
Drupal\Component\Plugin\Exception\MissingValueContextException: Required contexts without a value: entity in Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping() (line 155 of core/lib/Drupal/Core/Plugin/Context/ContextHandler.php).I understand the problem now, but I'm not sure yet what the best solution is. If you have any suggestion, please let me know.
Maybe we should disable the context or the block that throws the exception and tell the user (or not) that is not possible to use the reaction in this context.
I'm looking if the core has already any solution for it so we can do something similar.
Comment #9
silverham commentedI double checked the patch does actually work on node pages.
But am wrong however about working on homepages - it still crashes there - but that's out of scope.
Detailed steps to reproduce:
Comment #10
paulocsThanks @silverham!
Comment #12
paulocsFixed in dev branch.
Thanks @all.
Comment #13
silverham commentedGreat - thanks. :-)