$original_link is null regression

Created on 3 June 2025, about 1 month ago

Problem/Motivation

The patch in issue 3380953 has introduced a new issue.

if ($url->isExternal() || !$original_link->getUrlObject()->isRouted()) {
$original_link is null.

Error: Call to a member function getUrlObject() on null in admin_toolbar_links_access_filter_filter_non_accessible_links() (line 84 of modules/contrib/admin_toolbar/admin_toolbar_links_access_filter/admin_toolbar_links_access_filter.module).

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇪🇸Spain rteijeiro

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @rteijeiro
  • First commit to issue fork.
  • 🇫🇷France dydave

    Thanks a lot Ruben (@rteijeiro) for your help on this issue, it's greatly appreciated! 🙂

    The changes suggested in the patch in the issue summary have been added to the merge request MR !159 👌

    To be honest, I did not test this directly myself, since I'm not really using the admin_toolbar_links_access_filter module anymore...

    I think it was marked deprecated and supposed to be removed when future releases drop support for core versions below 10.3.
    So personally, I wouldn't really be interested in working on this, but I would not be opposed to getting this added to the module.

    If you could please help testing and reviewing the changes in the MR and if you think they could provide an acceptable solution, then I would be glad to get these changes merged in.

    Again, since we're looking at removing this module, we wouldn't be bothering with Tests, docs and such. But if getting this patch committed could help with your projects, we would certainly be glad to do so 🙂

    We would greatly appreciate if you could please try testing merge request MR !159 and give us your feedback or reviews.

    Feel free to let me know if you spot anything or if I missed anything else in the comments above, I would certainly be glad to help.
    Thanks in advance!

Production build 0.71.5 2024