- Issue created by @DamienMcKenna
- First commit to issue fork.
- Merge request !61663357596: Add a contextual link to disable a block. โ (Open) created by vbouchet
- Status changed to Needs review
about 1 year ago 9:05am 15 January 2024 - Status changed to Needs work
about 1 year ago 12:52am 16 January 2024 - ๐บ๐ธUnited States smustgrave
Appears to have a test failure.
Have not tested.
- ๐ฎ๐ณIndia pooja saraah Chennai
pooja saraah โ made their first commit to this issueโs fork.
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
It feels kind of tautological, but i guess no more than the other tests, looking at "Explicitly add and validate tokens" in the CSRF access checking documentation โ it looks like generating the URL like this would work:
Url::fromRoute( 'entity.block.disable', ['block' => $this->blockId], ['query' => [ 'token' => \Drupal::getContainer()->get('csrf_token')->get("admin/structure/block/manage/{$block->id()}/disable") ]]);
- ๐ฎ๐ณIndia prashant.c Dharamshala
This is a quite good improvement in the admin interface, will save from multiple clicks and navigation to disable a block.
The "disable block" is working properly as a contextual item
https://www.awesomescreenshot.com/video/28941116?key=7a42ca1e10b8f8ca8bf... - ๐ฎ๐ณIndia prashant.c Dharamshala
Just a thought we can have the ordering of the links in alphabetic order or basically "Remove" at the end because that will completely remove the block.
- Configure block
- Disable block
- Remove block
- ๐ณ๐ฑNetherlands Summit
Hi, would it be possible to have a patch for this in Drupal 10.3?
I am looking for this functionality in latest stable Drupal version.
Thanks for your reply in advance,
Greetings, - ๐ฎ๐ณIndia prashant.c Dharamshala
@Summit
Please try the attached patch, it does not include tests as those are failing currently, It only consists of the change to provide an additional "Disable block" contextual menu item.
- ๐ณ๐ฑNetherlands Summit
Hi, tried https://www.drupal.org/project/drupal/issues/3357596#comment-15693587 โจ Add contextual menu item on blocks to allow disabling them Needs work
and indeed a -disabled block- feature arises.
But the block is still shown. And there is no -enabled block- feature. So I do not know if it is working?
greetings and thanks for building this, - ๐ฎ๐ณIndia prashant.c Dharamshala
Could you please attach a GIF etc. in which we can see the disable block not working and if you have any error in your "Recent log messages" page?
- ๐ณ๐ฑNetherlands Summit
Hi,
I can't show a GIF. It is just still there. I can send you a small video clip I made?
No error in the errorlog, sorry.Greetings,