Feature #84990

Updated by Sybille Peters over 1 year ago

h1. Problem

Currently, RteHtmlParser::markBrokenLinks checks only for broken *page links* and marks them accordingly. This makes usage of Linkvalidator very tedious, because the RTE edit form is opened by clicking on the edit icon in the list of broken links and then the user has no context whatsover which of the (possibly) several links in the edit field he should fix.

Since the functionality of marking broken *page* links is already implemented in TYPO3, it seems ideal to use this feature and extend it to improve the usability of Linkvalidator by providing this feature for *all* links.

h1. Possible considerations


If a link check is executed on each external link and file link etc. it means one extra DB query for each link on opening RTE. It might be a good idea to use already existing link cache in ExternalLinkTypes (todo).

h1. Possible solution

If
linkvalidator is installed and broken links records are available, the broken *external links* could be marked in the same fashion.

Also *file links* and other links could be considered.

This would not only make fixing broken links using the linkvalidator much easier, but would also make this information available whenever a record is edited.

Implement like this (see patch in Gerrit: https://review.typo3.org/56947):

# Add hooks in HtmlRteHtmlParser::markBrokenLinks for each linktype to call a link check function
# In Linkvalidator: connect to these hooks and check


Also, setting
the tx_linkvalidator_link table for already detected broken links (information about all broken links will style, must be in that table, can be done for external links, file links etc.)

The hooks should be called whenever the RTE editor is opened, if
* It is configured
differently, as $GLOBALS['TYPO3_CONF_VARS']['RTE']['checklinkmode'] == 'full' (new configuration field)
* *OR* if the RTE editor
this currently does not work with ckeditor, but this is opened from the Linkvalidator list of being addressed by #84987 ("Add css style for broken page links (this is a todo)

h1. Images
in ckeditor").

h2. Current situation:

!broken-links1.png!
!broken-links2.png!

h2. Solution

*With the suggested solution all broken links will be marked!:*

!rte.png!

Back