As a follow-up to #2874238: Broken links in various topics, it seems like we need a test that verifies links in user guide pages, especially in the Additional Information and Attributions sections. Documentation is being migrated on drupal.org, and sometimes apparently there are not redirects from old URLs to new URLs being added. Maybe they aren't being added at all ever, I don't know, but it seems like we're having broken links at least once.

Comments

jhodgdon created an issue. See original summary.

  • jhodgdon committed 06b89fa on 8.x-2.x
    Issue #2874508 by jhodgdon: Add tests for URLs in guide pages
    
jhodgdon’s picture

Status: Active » Fixed

I've made a test, plus a script that finds all URLs in any of the source directories, so the test can be updated periodically.

Currently, 13 URLs are failing the test. I'll go ahead and commit the test as it is, and then I think I will repurpose #2874238: Broken links in various topics to fix the URLs all together in that issue.

jhodgdon’s picture

I added a few more lines to the test, to test for URLs that have been redirected.

  • jhodgdon committed a36b7ff on 8.x-2.x
    Issue #2874508 by jhodgdon: Add tests for URL redirects
    
jhodgdon’s picture

I decided this would be better as just a script that finds URLs and tests them all in one, rather than having the extra step of a Simpletest test. We can just run this script when we want to test the URLs. So, commit coming soon...

To run the URL test script, go to the scripts directory, and type

php testurls._php ../source

at the command line (after I make the commit, which should be in a few minutes.

  • jhodgdon committed 20e1c31 on 8.x-2.x
    Issue #2874508 by jhodgdon: Test URLs in script instead of in simpletest
    

  • jhodgdon committed 7ef7c47 on 8.x-2.x
    Issue #2874508 by jhodgdon: Recognize percent as valid URL character
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.