Which links is this supposed to work for?

Created on 8 February 2025, about 2 months ago

Problem/Motivation

Absolutely love this ideaβ€” however, i have enabled it and it is not affecting either entity links such as those in a node reference field nor links where the entity that has the access denied rabbit hole has been added to a Drupal menu (with the autocomplete / internal link).

Caveat: Using Rabbit Hole 2.xβ€” would that be incompatible?

Also, this is an individual entity settings, not bundle-wide, in case that is relevant too.

Thanks!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

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

Comments & Activities

  • Issue created by @mlncn
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    All right, sorry, this works great for Label links (for example an entity reference field configured to display Label with "Link to the referenced entity" configured.

    It does not do anything for:

    • Menu links
    • Entity reference rendered entities
  • πŸ‡©πŸ‡ͺGermany Hydra

    Hey thx for the great feedback!
    Yeah unfortunately those systems don't use the link_generator service for generating the link. Afaik there is no way to alter the \Drupal\Core\Url object - which in those cases is used directly to create the link.
    So probably the LinkItem FieldType needs to be replaced to get this working with menu links, I would not mind commiting this if someone wants to work on this.

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    Oh there is a way i actually finally found this module while searching for the title of the blog post (to make sure it was not already written) that i was writing on doing this in custom code: https://agaric.coop/blog/turning-links-entities-have-been-rabbit-holed-m...

    But as noted there, the way to do it in contrib is annoying at best (and at least at one point for me a year or so ago, not working): https://drupal.stackexchange.com/a/246712/4195

Production build 0.71.5 2024