Problem/Motivation

Currently, when you save a block configuration entity, you might not be able to find it again easily.

I.e after you save a block, you will get the following message: "The block configuration has been saved". If you had accessed the block configuration from the contextual links and adapted the visibility conditions, you are likely to not be able to adapt the block settings, if the block doesn't show up on the screen anymore. Of course, you can still find it via the admin backend, but site admins might not even be aware of this path.

Steps to reproduce

  1. Open edit form of a block configuration entity's contextual link
  2. Make changes
  3. Save the configuration

Should see status message with a link to the entity and title of that entity for reference.

Proposed resolution

Similarly to content entities, it would be nice if the block configuration entity save message, would contain a link to the entity. As block configuration entities don't have a canonical url to be displayed, instead, I would suggest to add a link to the edit form.

Remaining tasks

User interface changes

The content of the summary has a link added, just like content entities use in their status report.

Current (before patch):

After patch:

Issue fork drupal-2912703

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dasjo created an issue. See original summary.

dasjo’s picture

Issue tags: +Vienna2017, +Novice
MaskOta’s picture

Before i continue i want to know if i am on the right track

As i understand we want to do this for all configuration entities right?

MaskOta’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: block-2912703-link_configuration_on_save.patch, failed testing. View results

MaskOta’s picture

Status: Needs work » Needs review
StatusFileSize
new6.31 KB

For now i just did blocks and views save. I wonder if this makes sense for all configuration. I did these two because you you can get to the configuration form through the contextual links and are very common and useful.

Status: Needs review » Needs work

The last submitted patch, 6: 2912703-5-link_config_on_save.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ivan berezhnov’s picture

Issue tags: +CSKyiv18

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

bbombachini’s picture

StatusFileSize
new6.99 KB

Re-rolled patch for 9.2dev.

bbombachini’s picture

StatusFileSize
new10.43 KB
bbombachini’s picture

Status: Needs work » Needs review

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

priyanka.sahni’s picture

Assigned: Unassigned » priyanka.sahni
priyanka.sahni’s picture

Assigned: priyanka.sahni » Unassigned

Verified by applying the patch #17 but it fails to apply.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Shubham Sharma 77’s picture

Tested the patch #17 but fail to apply in drupal-9.5.x-dev.

ranjith_kumar_k_u’s picture

StatusFileSize
new9.49 KB

Rerolled #16

vinmayiswamy’s picture

I verified and tested patch #24 in Drupal 9.5.x-dev version. Patch applied successfully.
Thanks @ranjith_kumar_k_u

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

shubham chandra’s picture

StatusFileSize
new9.51 KB

Re-rolled patch against #24 in Drupal 10.1.x

vadim ansari’s picture

Assigned: Unassigned » vadim ansari

I'll review this patch

vadim ansari’s picture

StatusFileSize
new24.15 KB
new27.97 KB

Applied patch #27 for Drupal 10.1.x version and working fine. adding screenshot for the reference.

vadim ansari’s picture

Assigned: vadim ansari » Unassigned

I have reviewed the patch #27.
It's working fine in drupal 10.1.x

bnjmnm’s picture

#27 was an unnecessary reroll that will not receive credit. As I've mentioned to you several times @Shubham Chandra - you can check if a patch truly needs a reroll by clicking "add test/retest" on the most recent patch and applying it to the most recent Drupal version.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs usability review, +Needs screenshots

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

Seems like an excellent feature and helpful

#29 appears to have done the manual review so I'll do the code

No new functions so nothing to typehint.
Tests have been updated for the new link.

I don't think such a feature would need a change record but maybe?

Tagging for usability review as it is a UI change

Also tagging for screenshots to be added to the issue summary for before/after.

Thanks!

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

capysara’s picture

Issue summary: View changes
Issue tags: -Needs screenshots

I embedded the screenshots provided in #29 into the issue summary and removed the screenshots tag.

capysara’s picture

I embedded the screenshots provided in #29 into the issue summary and removed the screenshots tag.

gafioni’s picture

I am working on this issue at Drupalcon Barcelona 2024.

gafioni’s picture

Assigned: Unassigned » gafioni
gafioni’s picture

Assigned: gafioni » Unassigned
Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

left some comments.

mrinalini9 made their first commit to this issue’s fork.

mrinalini9’s picture

Status: Needs work » Needs review

Addressed comments on the MR, please review it.

Thanks!

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new1.93 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nexusnovaz made their first commit to this issue’s fork.

xxkiemi’s picture

Status: Needs work » Needs review
rduterte’s picture

DrupalCon Nara 2025 we are reserving this issue for Mentored Contribution during the event.

After November 19, this issue returns to being open to all. Thanks!

Hi, I have checked the MR and the requested changes are applied we're moving the status to Needs review.

rduterte’s picture

Issue tags: +Nara2025
benjifisher’s picture

Usability review

We discussed this issue at #3559145: Drupal Usability Meeting 2025-11-28. That issue has a link to a recording of the meeting. I am giving issue credit here to the attendees: @benjifisher, @sahilps6, @the_g_bomb, and @simohell.

It looks as though the "Needs usability review" tag was added in Comment #32 because this issue makes a UI change. I do not think that every UI change should get that tag, but since a review was requested, we looked at the issue.

We agree that this change is a useful improvement. In short, +1 for this issue.

If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.

benjifisher’s picture

I am adding the tag for an issue summary update for two reasons.

First, it will help future reviewers if the issue summary uses the standard Issue Summary Template.

Second, the title and the issue summary suggest updating the status message "when you save a configuration entity". Block configuration is just one example of a configuration entity, and the current merge request (MR) just handles this case. So either the MR should be updated to handle the full scope of the issue or the scope should be narrowed to match what the MR does.

Narrowing the scope might be the right choice. For one thing, most contextual links are for content entities or for blocks. Most content entity edit forms already provide a link in the status message when the entity is saved. (This is not implemented in the base classs.) If the most common use case is for editing config entities using their contextual links, then it makes sense to handle blocks. (But views also have contextual links, and the patch in Comment #6 handled views as well as block configuration.)

Another reason to narrow the scope is that the base class Drupal\Core\Entity\EntityForm does not currently set a status message. So handling all config entities is complicated. Either add a status message to every class that extends EntityForm or else update the base class to add a status message (which might be disruptive) and remove status messages from child classes.

dcam made their first commit to this issue’s fork.

dcam’s picture

I'm setting this to Needs Work because there are reproducible test failures in core/modules/block/tests/src/Functional/BlockTest.php. One of the failures mentions that it can't find the old status message, which makes sense because this MR changes it. Also, the issue summary needs to have the standard template applied as @benjifisher mentioned in #49.

I have not performed a code review.

dcam’s picture

Status: Needs review » Needs work

Setting the status for real this time.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

mradcliffe’s picture

Issue tags: +Chicago2026

I performed Novice Triage on this issue. I am leaving the Novice tag on this issue because there are clear details for updating the issue summary provided by @benjifisher, and formatting the issue into an issue summary update. Remember to remove the tag when completing the issue summary update. There could be new remaining tasks and a new issue status based on updating the issue summary.

The Drupal Contribution Mentoring team is triaging issues for DrupalCon Chicago 2026, and we are reserving this issue for Mentored Contribution during the event.

After Thursday 26th March 2026 + 1 DAY (13:00 UTC), this issue returns to being open to all. Thanks!

ehlovader’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update

Rewrote the summary in the issue summary template
Added the steps to reproduce and remaining task section

rishi.kulshreshtha made their first commit to this issue’s fork.

mradcliffe’s picture

@RishiKulshreshtha , ehlovader , there is still some confusion about the scope of the issue. I think the recommendation was to reduce the scope to only Blocks and to make sure that the title and the issue summary reflects that scope change. If you have a chance, can you review @benijifisher's comment again and clarify the scope of the issue?

ehlovader’s picture

Title: Link to configuration edit form after config entity has been saved » Link to block configuration edit form after block config entity has been saved
Issue summary: View changes

Limiting the scope on original summary to block configuration.
Had added specific wording to my additions, like the steps to reproduce, when putting summary into template but hadn't done any additional changes to the original content until now.

Should concisely describe the scope of work and what has been done with the change.

mradcliffe’s picture

Thank you for coming back to the issue and updating it, @ehlovader. I think the new issue summary makes sense based on the usability review. This will help reviewers and contributors seeking to fix the remaining tests work on the issue.

ehlovader’s picture

Ofc, sorry it took me a bit to catch up after the con to return.

The two(?) remaining failing tests appear to be related to the block structure view and returning to the list after saving a block configuration. Since this pertained specifically to the contextual links and returning to the page where the block was placed (at least in my interpretation) I wonder if that is also out of scope.

Should the status message be changed when returning to that page? is it just updating the test to match wording?

And also is something we've changed here breaking the block-placement query string?, which iirc scrolls down the page to the block row.