Breaking: The validation settings classes of jobs were removed
Description
The job validation settings are read by the shared settings classes of academic_base, as the persons settings are. The classes and ViewHelpers academic_jobs had for them are removed:
\FGTCLB\Academic Jobs\ Loader\ Academic Jobs Settings Loader \FGTCLB\Academic Jobs\ Registry\ Academic Jobs Settings Registry \FGTCLB\, in a templateAcademic Jobs\ View Helpers\ Validation\ Field Type From Validation View Helper j:validation. field Type From Validation \FGTCLB\, in a templateAcademic Jobs\ View Helpers\ Validation\ Required From Validation View Helper j:validation. required From Validation \FGTCLB\andAcademic Jobs\ Exception\ Unknown Validator Exception \FGTCLB\. The job validator throws the classes of the same name in the namespaceAcademic Jobs\ Exception\ Unsuitable Validator Exception \FGTCLB\, with the same codes.Academic Base\ Settings\ Exception \FGTCLB\, which TYPO3 never loaded.Academic Jobs\ Service Provider
The view variable
{validations}
of the new job form changed with
them. It held a list of flags per property, and it holds one validation
object per property now, which carries
required
,
read,
disabled
and
input.
Impact
A template that calls one of the two ViewHelpers fails to render with an
error about an unknown ViewHelper. A template that reads a flag from
{validations}
directly reads nothing. PHP code using one of the
classes fails with a class that is not found.
Affected installations
Installations that override a partial of the new job form calling
j: (the shipped Job/ and
Job/ did), and installations with PHP code using
one of the classes. Searching the site package for
j:,
Academic and
\Academic finds them.
Migration
Resolve the validation of a field with the ViewHelper
validation of academic_base, and read its
properties:
<html xmlns:j="http://typo3.org/ns/FGTCLB/AcademicJobs/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{j:validation.RequiredFromValidation(validations: element.validations, identifier: element.identifier)}">
<abbr title="required">*</abbr>
</f:if>
<f:form.textfield
type="{j:validation.fieldTypeFromValidation(validations: element.validations, identifier: element.identifier)}"
property="{element.identifier}"
/>
<html xmlns:p="http://typo3.org/ns/FGTCLB/AcademicBase/ViewHelpers" data-namespace-typo3-fluid="true">
<f:variable name="validation" value="{p:validationEnsure(validations: element.validations, identifier: element.identifier)}"/>
<f:if condition="{validation.required}">
<abbr title="required">*</abbr>
</f:if>
<f:form.textfield
type="{validation.inputType}"
property="{element.identifier}"
/>
For a field the settings do not configure,
validation returns a
validation that is not required and renders a text input.