Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Steps to reproduce
- Create a role "foo"
- Create a block with a visibility condition on role "foo"
- Delete role "foo">
! ) Fatal error: Call to undefined method Drupal\system\Plugin\Block\SystemMenuBlock::setVisibilityConfig() in core/modules/block/block.module on line 248
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#6 | 2548617-4-test-only.patch | 1.51 KB | webflo |
#4 | 2548617-4.patch | 2.11 KB | webflo |
#2 | 2548617-2.patch | 631 bytes | joshi.rohit100 |
Comments
Comment #2
joshi.rohit100Should be this ?
Comment #3
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedI think
$block->setVisibilityConfig
is correct.Comment #4
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #5
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedFilled a similar/related issue for the node_type condition in #2549087: Block module should remove entity_bundle visibility conditions
Comment #6
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #8
webflo CreditAttribution: webflo at UEBERBIT GmbH commented#6 failed as expected
Comment #9
tim.plunkettNice find!
Comment #10
alexpottCommitted 207985a and pushed to 8.0.x. Thanks!
Btw. In future, having the last patch as a failing patch doesn't make much sense as the rtbc queue is retested.