Problem/Motivation
This module currently only indexes links that use the relative path. The link will not be indexed when the absolute path to the own website is used. Editors/content creators may choose to add absolute paths as valid links and expect them to be indexed as backlinks. Therefore this feature may reduce confusion by preventing missing links.
Steps to reproduce
Add an absolute path to your own content and try to have it indexed by the backlinks module.
Proposed resolution
We refine the validation process of the html string in BacklinksManager.php
For us it would not be necessary to make this feature configurable. However, if others would be helped by it, I could add an option for this feature to the config form. I will not add this configuration option until further notice.
Remaining tasks
Possible configuration option (see above: proposed resolution section).
User interface changes
API changes
Data model changes
Issue fork backlinks_index-3542183
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
m.gaebler commentedComment #6
matej.lehotsky commentedComment #7
matej.lehotsky commentedLooks good, thanks
Comment #8
matej.lehotsky commentedComment #9
matej.lehotsky commentedComment #10
m.gaebler commentedMy colleague reviewed the code and mentioned that
getCurrentRequest()may returnNULL. If this happens, thegetHost()method will not work, and our (new)isInternalAbsoluteLink()method will fail.For reference, see: Symfony\Component\HttpFoundation\RequestStack::getCurrentRequest()
We could add an extra check around this method call:
If you agree with this change, how do you suggest we proceed? Can we re-open the MR? Or should it be a new issue/MR?