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.
Comment | File | Size | Author |
---|---|---|---|
Schermafbeelding 2016-08-05 om 18.09.54.png | 25.09 KB | hiddejansman | |
Schermafbeelding 2016-08-05 om 18.20.01.png | 24.86 KB | hiddejansman |
Comments
Comment #2
anonDo not change the URI. If the url does not work, you haven't enabled the linkit filter on the text format.