Feature #84990

Epic #85006: Epic: Improve broken link handling in TYPO3 / linkvalidator

Check for other broken link types in RteHtmlParser

Added by Sybille Peters over 1 year ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Category:
Linkvalidator
Target version:
-
Start date:
2018-05-12
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

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.

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).

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):

  1. Add hooks in HtmlRteHtmlParser::markBrokenLinks for each linktype to call a link check function
  2. In Linkvalidator: connect to these hooks and check the tx_linkvalidator_link table for already detected broken links (information about all broken links will 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 as $GLOBALS['TYPO3_CONF_VARS']['RTE']['checklinkmode'] == 'full' (new configuration field)
  • OR if the RTE editor is opened from the Linkvalidator list of broken links (this is a todo)

Images

Current situation:


Solution

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

rte.png View (14.8 KB) Sybille Peters, 2018-05-25 22:27

broken-links2.png View (76.8 KB) Sybille Peters, 2018-05-31 12:12

broken-links1.png View (24.2 KB) Sybille Peters, 2018-05-31 12:14


Related issues

Related to TYPO3 Core - Bug #84987: Add css style for broken page links in ckeditor Closed 2018-05-12
Related to TYPO3 Core - Feature #84704: Linkvalidator: Open edit form for specific field in record (,not entire record) when fixing links Closed 2018-04-12

History

#1 Updated by Sybille Peters over 1 year ago

  • Related to Bug #84987: Add css style for broken page links in ckeditor added

#2 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#4 Updated by Sybille Peters over 1 year ago

  • Subject changed from Check for broken external links in RteHtmlParser to Check for other broken link types in RteHtmlParser
  • Description updated (diff)

#5 Updated by Sybille Peters over 1 year ago

  • Description updated (diff)

#6 Updated by Sybille Peters over 1 year ago

  • Parent task set to #85006

#7 Updated by Sybille Peters over 1 year ago

  • Category changed from RTE (rtehtmlarea + ckeditor) to Linkvalidator

This could probably be better handled only in Linkvalidator itself using the already existing hook: `$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['transformation'][detectbrokenlinks]` to override markBrokenLinks

#8 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#9 Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#10 Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#11 Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#12 Updated by Gerrit Code Review over 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#13 Updated by Sybille Peters over 1 year ago

  • Related to Feature #84704: Linkvalidator: Open edit form for specific field in record (,not entire record) when fixing links added

#14 Updated by Sybille Peters over 1 year ago

  • Description updated (diff)

#15 Updated by Sybille Peters over 1 year ago

#16 Updated by Sybille Peters over 1 year ago

#17 Updated by Sybille Peters over 1 year ago

  • Target version set to next-patchlevel

#18 Updated by Sybille Peters over 1 year ago

  • Target version deleted (next-patchlevel)

#19 Updated by Gerrit Code Review about 1 year ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#20 Updated by Gerrit Code Review 12 months ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58669

#21 Updated by Gerrit Code Review 12 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#22 Updated by Gerrit Code Review 12 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#23 Updated by Gerrit Code Review 12 months ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56947

#24 Updated by Gerrit Code Review about 1 month ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/56947

#25 Updated by Gerrit Code Review about 1 month ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/56947

#26 Updated by Gerrit Code Review about 1 month ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/56947

#27 Updated by Gerrit Code Review about 1 month ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/56947

#28 Updated by Gerrit Code Review about 1 month ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/56947

Also available in: Atom PDF