Problem/Motivation

Issue #3463291: Deprecate the admin_toolbar_links_access_filter module introduced an update hook that disabled the Admin Toolbar Links Access Filter module when the Drupal core version is 10.3 or above. For site admins that update to this module before updating to Drupal core 10.3 the update is not performed. When in the future the module is removed from the repository this will lead to fatal errors.

Proposed resolution

Inform site admins on the status report.

User interface changes

An error message will be on /admin/reports/status.

I will provide a patch to add the hook_requirements information.

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

ericmulder1980 created an issue. See original summary.

ericmulder1980’s picture

Status: Active » Needs review

Please review the merge request.

ericmulder1980’s picture

StatusFileSize
new1.53 KB

For people needing a patch file, see attached.

ericmulder1980’s picture

Fixed some coding standards.

Also i have a question about the version the hook_update is targeting. Issue #3463291 mentions the Admin Toolbar Links Access Filter module is obsolute since the Drupal core issue has been fixed in version 10.2. Then, why do we target the update for 10.3 and above?

dewancodes’s picture

@ericmulder1980 When we can expect the final MR to be accepted? I want to upgrade this module.

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

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

dydave’s picture

ericmulder1980’s picture

@dewancodes i can't accept my own merge request. It needs to be reviewed by the community and the module maintainer then chooses to merge this into develop.

dydave changed the visibility of the branch 3.x to hidden.

dydave’s picture

Version: 3.5.1 » 3.x-dev
Category: Bug report » Task
Priority: Major » Normal
StatusFileSize
new55.22 KB
new27.7 KB
new96.97 KB

Thanks everyone!

I've taken a quick look at this issue and checked the changes from MR!103, which seem to work as expected and display an error message on the status report page, see:

But since the module was marked deprecated in #3463291: Deprecate the admin_toolbar_links_access_filter module, there is already a warning message appearing on the status report page, see:

Additionally, there is a clear warning when the module is installed through the Admin UI, see:


 

Do you think these warnings from core and/or other contrib modules are not enough or should be made even more visible?

Personally, I'm not completely convinced this change would be necessary, but if you think it should be added and "could" help some users, I wouldn't be opposed, given the minimal impacts the corresponding code changes would have on the module.

I just think the current warning messages are clear enough with helpful links.
It should be part of site administrator's tasks to check regularly the status report page when proceeding to upgrades.
 

In case you still think we should move forward with this change, I created a new merge request MR!122 based on the previous one with minor changes:

  • Moved the code to admin_toolbar_links_access_filter/admin_toolbar_links_access_filter.install, instead of admin_toolbar.install, since we'd like that kind of cruft to go away when the module is removed.
  • Updated the wording.
  • Updated the lifecycle (deprecated) URL to point to #3463291: Deprecate the admin_toolbar_links_access_filter module.

 

If this issue gets enough traction and more feedback on the merge request, we would be happy to consider adding this to the module.

Thanks in advance!

dydave’s picture

ericmulder1980’s picture

@dydave,

Thank you so much for looking into this. I agree that there are already a few warnings in place and that it is the site maintainers responsibility to check these. For many contributed modules this doesn't have a fatal impact as removing them as a whole from the codebase is also a decision often made by or in collaboration with a site maintainer.

As this is a submodule of a very popular contrib module i do feel that this is something that could be overlooked. As you mentioned the impact on the codebase is minimal and it could prevent fatal errors for lots of users.

Not sure how much response this will get as most people will only go to the issue queue once they indeed have encountered an issue. Let's see what happens.

dydave’s picture

Thanks a lot Eric (@ericmulder1980) for your kind, constructive reply and for taking the time to share your thoughts, it's greatly appreciated!

Thanks a lot for raising this issue and anticipating on any future potential impacts on users projects.

As mentioned before, I'm favorable to getting this in the module, no problem at all 👌
If you'd like, we could get this included in the next stable release.

Let's get the patch validated (RTBC-ed if possible)?
Were you able to test the patch from the merge request above MR!122, check the wording, check the message and feature (display of the error message)?

Anything that could help validating and confirming the changes so they could be pending merge for the next stable ...
We'll then leave a bit of time to get more feedback and before creating the release we'll get this one merged in.

Again, any help, comments, feedback, questions or suggestions would be greatly appreciated!
Thanks again Eric and in advance!

ressa’s picture

Issue summary: View changes

Thanks for working on this, just turning the issue reference into a link :)

ressa’s picture

A release is planned soon (21 May), so this issue needs a review fairly soon, for it to be included ...

dydave’s picture

Thanks a lot @ressa!

Worst case: we don't necessarily need to wait for Eric's (@ericmulder1980) feedback:

Mostly, what remains for this issue:

Let's get the patch validated (RTBC-ed if possible)?
Were you able to test the patch from the merge request above MR!122, check the wording, check the message and feature (display of the error message)?

Anything that could help validating and confirming the changes so they could be pending merge for the next stable ...

Basically, if you could test the patch:
On a Drupal Core version above 10.3, apply the patch, then enable the admin_toolbar_links_access_filter module.
Just check the message displays as expected and whether you think the wording is clear enough....

That should be enough for us to RTBC the issue and get it merged quickly after 👌

I wish Eric (@ericmulder1980) could have replied on this, but if we can't get a reply before the next release, then it would be great if you could maybe take a very quick look at this one, just to confirm everything is in order 🙂
Anyone else is of course more than welcome to help reviewing the patch, as well.

The impact of this MR is very limited, so it should be very safe to merge 👍
Bear in mind all of this should be trashed once the admin_toolbar_links_access_filter module can be removed from the code base (when support below 10.3 is dropped).

Let us know if you catch anything or have more suggestions or comments on any aspects of this ticket or the merge request, it would definitely be very helpful! (as always @ressa 😉)
Thanks in advance!

ressa’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new45.53 KB

No problem @dydave, I am only glad I can help, and thank you @ericmulder1980 for creating this issue and MR in the first place :)

I installed Admin Toolbar dev-version in Drupal 10.4.6, applied this issue's patch, installed the Admin Toolbar Links Access Filter module, and got the warnings you shared in comment #13.

I went to the Status page and got this Error message (HTML copied form that page):

Status Details


Errors found

Admin Toolbar Links Access Filter
The features of the Admin Toolbar Links Access Filter module are included in Drupal core since version 10.3 and therefore it should be uninstalled.
Since the module is no longer needed, it will be removed in future releases of Admin Toolbar when support for versions lower than 10.3 is dropped.

See issues: #3463291 and #3487246.

Error message

The wording is spot on, and users who read it, have been informed that the module will be removed in the future, when support for versions lower than 10.3 is dropped. So this issue is RTBC.

And it will be great to eventually be able to remove this module, and continue adding marginal gains in Drupal :)

  • adriancid committed 3f737eed on 3.x authored by dydave
    Issue #3487246 by dydave, ericmulder1980: Warn site owners about the...
adriancid’s picture

Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.