While on an entity view route that is assigned to a domain source, link destinations are broken because they include the domain

Created on 6 November 2024, 10 months ago

Drupal Version

Drupal 10.3.5

Domain module version

Domain 2.0.0-beta2

Expected Behavior

When on an entity view route, I expect any links generated to include a destination by RedirectDestinationTrait or \Drupal\Core\Routing\RedirectDestination to have a proper, working destination. That is, the destination being an absolute link to the current page but without the domain.

Actual Behavior

Destinations generated by RedirectDestination include the entity's domain, which breaks the functionality of the destination. When you visit the link, the destination parameter disappears, presumably because it is considered an external destination.

Steps to reproduce

I'm not sure the easiest way to reproduce. I encountered this issue with a custom block that uses RedirectDestinationTrait to create a login link with a destination of the current page.

Additional Information

I traced this issue to the very thing mentioned in #3197879: Domain module renders invalid URLs when using domain source โ†’ where DomainSourcePathProcessor always sets the absolute option to true when viewing an entity assigned to a domain source.

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States pianomansam

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

Comments & Activities

  • Issue created by @pianomansam
  • Status changed to Closed: outdated 7 days ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    Not sure what to do here. Closing for now.

    Feel free to reopen if if you have new elements to share.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States pianomansam

    I donโ€™t think blindly closing an open issue is the best choice. Also, what makes it outdated? Thatโ€™s usually reserved when a new major release comes out. This was created for beta 2, and beta 3 is the latest release. Thatโ€™s not a major release difference.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    I'll be happy to reopen it once we have a reproducible scenario that will allow us to work on the problem.

    But there is no point in keeping hundreds of idle issues open..

    I'm just trying to clean up things a bit.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance mably

    BTW the problem might be fixed in latest 2.0.x dev branch.

Production build 0.71.5 2024