-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Mark broken file links in RTE
Broken file links are now marked in RTE with yellow background and red border. This patch uses the previously introduced event :php:`BrokenLinkAnalysisEvent`. The broken links are only detected if linkvalidator is installed and has checked for broken links (e.g. via scheduler). Resolves: #84990 Releases: master Change-Id: Iddebe7f9358901c70f90f9751298ce2905684662 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62091 Tested-by: Daniel Goerz <daniel.goerz@posteo.de> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Sybille Peters <sypets@gmx.de> Tested-by: Riccardo De Contardi <erredeco@gmail.com> Tested-by: Susanne Moog <look@susi.dev> Reviewed-by: Sybille Peters <sypets@gmx.de> Reviewed-by: Benni Mack <benni@typo3.org> Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by: Susanne Moog <look@susi.dev>
- Loading branch information
1 parent
3669742
commit 7378035
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
.../core/Documentation/Changelog/master/Feature-84990-MarkBrokenFileLinksInRTE.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
=============================================== | ||
Feature: #84990 - Mark broken file links in RTE | ||
=============================================== | ||
|
||
See :issue:`84990` | ||
|
||
Description | ||
=========== | ||
|
||
Links to files that were detected as broken by the system extension | ||
`linkvalidator` are now marked accordingly in the RTE via | ||
:php:`TYPO3\CMS\Core\Html\Event\BrokenLinkAnalysisEvent`. | ||
|
||
Those links are now marked with extra markup (yellow background with | ||
red border) in RTE. | ||
|
||
The procedure for marking the broken links in the RTE is as follow: | ||
|
||
#. RTE content is fetched from the database. Before it is displayed in | ||
the edit form, RTE transformations are performed. | ||
#. The transformation function parses the text and detects links. | ||
#. For each link, a new PSR-14 event is dispatched. | ||
#. If a listener is attached, it may set the link as broken and will set | ||
the link as "checked". | ||
#. If a link is detected as broken, RTE will mark it as broken. | ||
|
||
The implementation for checking file links is supplied by the system | ||
extension `linkvalidator`. | ||
|
||
Other extensions can use the event to override the default behaviour. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
The behaviour stays the same as before unless the system extension `linkvalidator` | ||
is installed. | ||
|
||
If `linkvalidator` is installed and regularly checks for broken file links, those | ||
links will be marked in the RTE. | ||
|
||
If `linkvalidator` is used, it is recommended to use the scheduler to regularly | ||
check for broken links. | ||
|
||
|
||
.. index:: RTE, ext:linkvalidator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters