• Resolved larsmagne23

    (@larsmagne23)


    The broken link checker works fine, but it would be nice if there was a one-click solution to fix broken links by redirecting to the Wayback Machine (when the link in question points to a page that’s archived there).

    That is, if https://example.org/foo is a 404, then https://web.archive.org/web/https://example.org/foo will, in many cases, be a good alternate. (The plugin should check whether archive.org has the link first, of course.)

    So perhaps a “use archive.org” button on each broken link? I think that would be immensely useful.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @larsmagne23

    I hope you’re well today!

    Do you think that a simple link – without checking if the treated URL actually exists there in archive.org – would do or does it need to be checked? I believe Archive does have some sort of API but I’m not much familiar with it so it’s hard to say how complex it would be to implement such check.

    I was thinking that maybe a bit different solution would work: something like a “custom re-link” setting in “Advanced settings” were you can just set a specific link to be used like that?

    You could e.g. set “web.archive.org/web/{URL}” (were {URL} would be replaced with the original URL that you want to redirect there) or just “google.com” or any other URL and that would work as “fixed” tool – without checking but you could use it e.g. “in bulk”.

    Would that work?

    Best regards,
    Adam

    Thread Starter larsmagne23

    (@larsmagne23)

    I think it would be best to do a check on archive.org before doing any link renaming. I went through all the invalid links on my site earlier today, and about two thirds of the links were on archive.org, but for the remaining one third, it’s less confusing to just leave the links as they are.

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Really appreciate the feedback here @larsmagne23

    I’m going to share this with our developers for further consideration, as more changes and fixes will follow. ??

    Warm regards,
    Dimitris

    I activated this plugin again (not being used since 2015), and as far as I remember, this feature was available back then =(

    Checked here, the plugin already uses Wayback machine (file /includes/admin/links-page-js.php):

    function findReplacementSuggestions(url, suggestionList) {
    		var searchingText     = '<?php echo esc_js( _x( 'Searching...', 'link suggestions', 'broken-link-checker' ) ); ?>';
    		var noSuggestionsText = '<?php echo esc_js( _x( 'No suggestions available.', 'link suggestions', 'broken-link-checker' ) ); ?>';
    		var iaSuggestionName  = '<?php echo esc_js( _x( 'Archived page from %s (via the Wayback Machine)', 'link suggestions', 'broken-link-checker' ) ); ?>';
    
    		suggestionList.empty().append('<li>' + searchingText + '</li>');
    
    		var suggestionTemplate = $('#blc-suggestion-template').find('li').first();
    
    		//Check the Wayback Machine for an archived version of the page.
    		$.getJSON(
    			'https://archive.org/wayback/available?callback=?',

    but it takes a lot of time to do this to every broken link. I have now more than 4000 links to check. It would be way better to do this automatically to every broken link.

    Hello @lucasms

    I hope you’re doing well!

    Thank you for your feedback, we have forwarded it to our developers and that having a closer look at this.

    If you have any further questions, please open a new thread in www.remarpro.com forums.

    Kind regards,
    Nastia

    Hello @larsmagne23

    When editing those broken links you will be able to see the archive.org suggestions if there are any.

    Best reagrds,
    Biplav.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Use archive.org for broken links?’ is closed to new replies.