Problem/Motivation
Relative links aren't handled correctly.
Steps to reproduce
Create a page with a relative link in a field (one that Link Magician will process).
Run Tidy on the page.
Check the 'Skipped' results for the batch (/admin/link_magician/tracking/results/skipped/{batchid})
Proposed resolution
The code in processAnchorTags and processImageTags both ignore the fact that url's in src/href can be relative and should be updated to account for relative links.
Test
Create 2 pages:
- "Test Page - Child" with the URL alias set to /test/child
- "Test Page - Parent" with the URL alias set to /test/parent with a relative link to the child:
<a href="child">Child page</a>
Run link magician on the parent page: drush link_magician:tidy nodeid --nodeid=NNNN
See the "Updated" results (/admin/link_magician/tracking/results/updated/{batchid}). You should see an update to the link listed.
Issue fork link_magician-3584578
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
jasongose commentedComment #4
jasongose commentedI plan to clean up the commit message at merge :)
Comment #5
jasongose commentedUpdated the test steps to have the correct "Update" page.
Comment #6
cameron prince commentedTesting step pass. Marking RTBC!
Comment #7
jasongose commentedThanks!
(Merged)
Comment #9
jasongose commented