-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert links to their internal link representation if they exist #4984
Comments
This is about the field so it's not a duplicate of that one. It's got its own weirdness. |
I wonder if this is fixed in d7 now with https://www.drupal.org/files/issues/2019-12-12/link-n836710-44.patch which attempts to convert the link to its internal path (eg. node/1). |
@indigoxela I've got a PR for this. |
@herbdool Cool, many thanks! But... the scope of this issue seems to have evolved. It might make sense to update the description and - most of all - the issue title to prevent confusion. This is the D issue, right? https://www.drupal.org/project/link/issues/836710 Is this covered by any of our meta issues? We have several for the Link module, and I lost track. |
Yes, it's that issue. It's not covered by the Link Meta issues. It's been committed in d7 but not in a release yet (would be 7.x-1.8). I don't think it's scope has evolved so much because it does fix this specific bug by providing a new option. It also helps that it helps keep it in line with the d7 module. |
Evolved means, that it adds another field setting form item (UI change) and provides features beyond the prefix duplication bugfix. The issue title and description should cover that. I'll try to test this as soon as possible (not today). |
I did some testing. Bad news, the output is still wrong for multilingual. This is how I tested:
So the new feature works, internal paths get handled as expected, but the prefix problem isn't solved by it yet. A screenshot of the newly added setting in the advanced options of link field: |
The problem seems to be that in function I see, the Drupal community also realized: https://www.drupal.org/project/link/issues/2428185 Was fixed with Link D7 version 1.7, so we don't have a meta covering that fix yet, I think. |
Description of the bug
When adding an internal link to a Link field, and with language prefixes enabled, I'm getting
fr/fr/path
. It should be only adding it once.Enable Link, Language, Content Translation. As two languages and set it to negotiate with prefixes. Enable translation on the page content type. Add some dummy content in both languages. Add a link field to any content type and add a node which references a page in another language.
Possible solution
Convert links to their internal link representation if they exist. https://www.drupal.org/project/link/issues/836710 fixes this by providing a new option: convert the URL to an internal system path. An alias gets turned into
node/1
for example.The text was updated successfully, but these errors were encountered: