- Issue created by @abramm
- e0ipso Can Picafort
I think the tokens road is the my preferred, but I could go both ways.
- First commit to issue fork.
- π§πͺBelgium attiks
Ran into the same problem, needed the URL of the entity when using the display.
- π¨πSwitzerland grumpy74 Geneva, CH π¨π
As a workaround, you could still add a field to host those values on the node (hide them in the node form) and use hook_node_view to alter the fields values and set the required values (the hook has access to the node entity).
But Iβm agree, it would be great to have those values available out of the box. As well, it would be a good idea to allow pseudo fields to be used in the SDC display mapping.
- Status changed to Needs review
6 days ago 7:53am 14 August 2025 - πͺπΈSpain pcambra Asturies
Taking a look a this, we can easily fall into entities that do not have canonical URLs
Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: Cannot generate default URL because no link template 'canonical' or 'edit-form' was found for the 'paragraph' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 211 of core/lib/Drupal/Core/Entity/EntityBase.php).
I think it is ok to pass id, entity_type and bundle, but we should remove URL and leave that for π Implement Token Replacements Active
-
pcambra β
committed 5c73ea0e on 2.x authored by
attiks β
Issue #3462243 by pcambra, attiks: Passing the entity object/ID/URL into...
-
pcambra β
committed 5c73ea0e on 2.x authored by
attiks β