Project

General

Profile

Actions

Feature #89426

open

Remove stale broken links in tx_linkvalidator_link

Added by Sybille Peters about 5 years ago. Updated about 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2019-10-15
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

If a page (or content element, or ...) is removed, the related broken links are not removed from tx_linkvalidator_link.

They are not displayed because only broken links of subpages of current page are displayed, so it is not a huge problem. But, eventually, this clutters up the tx_linkvalidator_link table.

Currently, there is no possibility to remove stale (no longer relevant) broken links except removing them manually from the db table.

Actions #1

Updated by Sybille Peters about 5 years ago

  • Subject changed from Give possibility to remove stale broken links in tx_linkvalidator_link to Remove (or do not show) stale broken links in tx_linkvalidator_link
Actions #2

Updated by Sybille Peters about 5 years ago

  • Parent task set to #85006
Actions #3

Updated by Riccardo De Contardi almost 5 years ago

  • Status changed from New to Needs Feedback

Is this one still reproducible? Could you add an example?

I tried with the following test on 10.3.0-dev:

1) I created a new "Header" content element (ID=269)
2) on the header_link field, I added a non-existent link: https://www.typo3.org/sidfhrthorteiheoprit
3) Info > linkvalidator > check links > the link is reported (external links)
4) on the database > table tx_linkvalidator_links contains the line:

uid record_uid record_pid headline field table_name link_title url url_response last_check link_type needs_recheck
27 269 244 header test header_link tt_content NULL https://www.typo3.org/sidfhrthorteiheoprit {"valid":false,"errorParams":{"errorType":404,"exception":"Client error: `GET https:\/\/www.typo3.org\/sidfhrthorteiheoprit` resulted in a `404 Not Found` response:\n<!DOCTYPE html>\n<html lang=\"en-US\">\n<head>\n\n<meta charset=\"utf-8\">\n<!-- \n\tMaintained by the typo3.org team\n\n\tThis websit (truncated...)\n","message":"The requested url was not found (404)."}} 1581633094 external 0

5) Delete the content element
6) Info > linkvalidator > check links (again) > now the broken external links reported are 0
7) on the database the row has been removed

Am I misinterpreting it? A different test is necessary?

Actions #4

Updated by Sybille Peters almost 5 years ago

Your test was perfect except in order to reproduce this, you must remove the page (not just the content).

Clarification: Before links are rechecked, linkvalidator removes all links of list of pages it is rechecking from tx_linkvalidator_links. However, if a page no longer exists, the corresponding broken links will never be removed from tx_linkvalidator_link. They will not show up in the list of broken links in the BE. But, eventually, the list of broken links will contain "stale" (no longer relevant) broken links and this will likely increase over time.

You can only see this if you look directly in the DB table.

Reproduce

  1. Create content with one or more broken links
  2. Check for broken links (in BE linkvalidator module or by using the scheduler task)
  3. Remove a page which contains content with broken links
  4. Check for broken links again
  5. Look in table tx_linkvalidator_link

Expected result

No records for deleted content in tx_linkvalidator_link

Actual result

tx_linkvalidator_link DB table constains records for deleted content.

Actions #5

Updated by Sybille Peters almost 5 years ago

  • Subject changed from Remove (or do not show) stale broken links in tx_linkvalidator_link to Remove stale broken links in tx_linkvalidator_link
Actions #6

Updated by Sybille Peters almost 5 years ago

  • Description updated (diff)
Actions #7

Updated by Sybille Peters almost 5 years ago

The title and description was wrong / misleading. I have corrected this.

Actions #8

Updated by Sybille Peters almost 5 years ago

  • Parent task deleted (#85006)
Actions #9

Updated by Riccardo De Contardi almost 5 years ago

  • Status changed from Needs Feedback to New
Actions #10

Updated by Benni Mack over 2 years ago

  • Sprint Focus set to On Location Sprint
Actions #11

Updated by Oliver Hader about 2 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF