Breaking: #29342 - Improve ValidatorTask

See Issue #29342

Description

In TYPO3 version 10 ext:linkvalidator has been improved a lot. The \TYPO3\CMS\Linkvalidator\Task\ValidatorTask - a scheduler task for reporting broken links via email has been refactored now.

The old marker templates have been replaced by FluidEmail. A Fluid template is now used for generating the report email. The marker template has been removed completely along with corresponding functionality.

The following property of the ValidatorTask class has been removed:

  • $emailTemplateFile

The following hooks have been removed and won’t be executed anymore:

  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['reportEmailMarkers']
  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['buildMailMarkers']

The following properties of the ValidatorTask class have changed their type:

  • $page is now int
  • $depth is now int
  • $emailOnBrokenLinkOnly is now bool
  • $configuration is now string

Impact

It is no longer possible to set a custom marker based template file with emailTemplateFile. Instead, the new field emailTemplateName can be used to specify a Fluid template file, see Migration section below.

Affected Installations

All installations which use:

  • the task by providing a custom template file.
  • one of the hooks mentioned above.

Migration

If you currently don’t use a custom template or one of the hooks mentioned above, you don’t need to migrate anything.

Otherwiese you have to provide your custom templates using the new field emailTemplateName in the task configuration and adding your custom template path to $GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'].

Furthermore use the new PSR-14 event \TYPO3\CMS\Linkvalidator\Event\ModifyValidatorTaskEmailEvent to adjust the \TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult along with the FluidEmail object.