The Linkit Filter is using $entity->toUrl() to get entity URL's.

In some situations the default URL is not the canonical URL. If 'canonical' is added as an argument, it will always be the canonical.

$url = $entity->toUrl()->toString(TRUE);

Changing the above code to:

$url = $entity->toUrl('canonical')->toString(TRUE);

Comments

anon created an issue. See original summary.

  • anon committed 01b39f6 on 8.x-5.x
    Issue #2779735 by anon: Ensure canonical URL in LinkitFilter
    
anon’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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