When adding a link in Drupal's WYSIWYG-editor through the Linkit dialog and selecting a taxonomy term from the autocomplete list, the autocomplete input field shows the 'incorrect' path to its destination. For example 'entity:taxonomy_term/23' instead of 'entity:taxonomy/term/23'.

When i look into the code, the path is constructed in function buildPath() in file /src/Plugin/Linkit/Matcher/EntityMatcher.php:

return 'entity:' . $entity->getEntityTypeId() . '/' . $entity->id();

Of course, this wil return 'taxonomy_term', because that's its Entity Type ID. But when I change the code a bit and replace the underscore with a slash, I ran into another problem: the URL validator tells the URI is invalid when i hit 'Save', probably because 'taxonomy/term' is not a guilty Entity Type ID..

I've added screenshots for clarification.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hiddejansman created an issue. See original summary.

anon’s picture

Status: Active » Closed (works as designed)

Do not change the URI. If the url does not work, you haven't enabled the linkit filter on the text format.