Problem/Motivation
Using the current dev version, the check to determine if the user status options are set is inadequate. Currently, if no user status options are set the code meant to prevent processing of options of the user status condition incorrectly identifies options as having been set and eventually returns false, meaning most blocks will fail to display.
Steps to reproduce
Add block to region before enabling module.
Enable Context.
Edit block settings, but don't change anything, just save.
Block no longer displays.
Proposed resolution
Editing the block settings sets all the values in the user status options to 0, but the check in the code meant to prevent hiding blocks if this section isn't filled in is using empty(). The array of options isn't empty, it has four variables set to 0.
I'll attach a patch that adds an additional check to see if all options are set to 0, and if so, returns true right away.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | global-block-no-longer-rendered-3225763-2.patch | 659 bytes | jmickela |
Comments
Comment #2
jmickelaThis check fixes the issue
Comment #3
willemviljoen commentedExperiencing the same issue using Context 8.x-4.0 on Drupal 9.2.2.
Patch #2 seems to fix the issue, could not pick up any issues after patching so far.
Comment #4
paulocsThanks!
Comment #6
paulocsComment #8
ecj commentedBig problem fixed here. After this no issues anymore. Thanks.