[Bug 43364] New: Add a maintenance script to find dead links in biblio records, items or authorities
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 Bug ID: 43364 Summary: Add a maintenance script to find dead links in biblio records, items or authorities Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: jake.deery@openfifth.co.uk, robin@catalyst.net.nz Target Milestone: --- Allow to regularly run such a script to find dead links and notify library staff. It may be sufficient to do a HTTP HEAD request. (Perl modules like LWP::UserAgent allow specifying the number of redirects to follow.) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Marcel, are you aware of the link-checker scripts? I believe that is doing just that. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #1)
Hi Marcel, are you aware of the link-checker scripts? I believe that is doing just that.
Will check. Thx -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, I didn't remember the name earlier, it's this one: https://koha-community.org/manual/latest/en/html/cron_jobs.html#check-url-qu... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Yeah I found it now. Will rephrase this report to include items and authorities. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add a maintenance script to |Extend cronjob |find dead links in biblio |check-url-quick by |records, items or |optionally checking URIs in |authorities |items and authorities -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #0)
Allow to regularly run such a script to find dead links and notify library staff. It may be sufficient to do a HTTP HEAD request. (Perl modules like LWP::UserAgent allow specifying the number of redirects to follow.)
See above. Biblio is dealt with in check-url-quick. Would be nice to add some default setups for common URL fields. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #4)
Yeah I found it now. Will rephrase this report to include items and authorities.
+1 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olivia.reynolds@openfifth.c | |o.uk Assignee|koha-bugs@lists.koha-commun |olivia.reynolds@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch Comma delimited| |Rijksmuseum, Netherlands list of Sponsors| | Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #7 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 207046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207046&action=edit Bug 43364: Support checking items and authorities in check-url-quick This patch refactors check-url-quick to make checking different object types easier. It also introduces link checking for items ($u, ->uri) and authorities (MARC21 024$0 and 024$1). MARC21 024$a is specified as non-machine dereferenceable, so isn't checked. Test plan: 1. Apply patch. 2. Ensure your Koha instance is configured for MARC21. 3. Ensure there is an item in the catalog with an invalid URL, for example "https://example.fake". 4. Ensure there is an authority in the catalog with an invalid URL in 024$0 and 024$1, for example "https://example.fake". 5. Run `perl misc/cronjobs/check-url-quick.pl --items --authorities`. 6. Verify the output mentions the item once, and the authority twice (once for each invalid URL). 7. Run `perl misc/cronjobs/check-url-quick.pl --items --authorities --html --host <HOST_HERE> > bug_43364.html` replacing `<HOST_HERE>` with the relevant hostname for your Koha. 8. Open the resultant `bug_43364.html` in a browser. 9. Verify the table includes the item once, and the authority twice as before. 10. Verify that the links to the item and authority correctly take you to their edit pages. Sponsored-by: Rijksmuseum, Netherlands -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Rijksmuseum, Netherlands |Netherlands, Rijksmuseum, list of Sponsors| |Rijksmuseum, Netherlands Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207046|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 207068 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207068&action=edit Bug 43364: Support checking items and authorities in check-url-quick This patch refactors check-url-quick to make checking different object types easier. It also introduces link checking for items ($u, ->uri) and authorities (MARC21 024$0 and 024$1). MARC21 024$a is specified as non-machine dereferenceable, so isn't checked. Test plan: 1. Apply patch. 2. Ensure your Koha instance is configured for MARC21. 3. Ensure there is an item in the catalog with an invalid URL, for example "https://example.fake". 4. Ensure there is an authority in the catalog with an invalid URL in 024$0 and 024$1, for example "https://example.fake". 5. Run `perl misc/cronjobs/check-url-quick.pl --items --authorities`. 6. Verify the output mentions the item once, and the authority twice (once for each invalid URL). 7. Run `perl misc/cronjobs/check-url-quick.pl --items --authorities --html --host <HOST_HERE> > bug_43364.html` replacing `<HOST_HERE>` with the relevant hostname for your Koha. 8. Open the resultant `bug_43364.html` in a browser. 9. Verify the table includes the item once, and the authority twice as before. 10. Verify that the links to the item and authority correctly take you to their edit pages. Sponsored-by: Rijksmuseum, Netherlands Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43364 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement to the release notes| |misc/cronjobs/check-url-qui | |ck.pl script: | |- makes checking different | |objects easier | |- adds link checking for | |items ($u, ->uri) | |- adds link checking for | |authorities (MARC21 024$0 | |and 024$1 (MARC21 024$a is | |specified as non-machine | |dereferenceable, so isn't | |checked) CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org