Project

General

Profile

Actions

Bug #82651

closed

Prevent same type converters from being registered multiple times

Added by Romain Canon over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
-
Start date:
2017-10-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
type,converter
Complexity:
Is Regression:
Sprint Focus:

Description

About the issue

Currently, calling the method \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter several times with the same type converter class name will lead to duplicate entries being added to $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['typeConverters'].

This can lead to issues when type converters are being used just after a strong cache clearing (the clear cache from the install tool). In this case, the type converters are registered twice because of the way the localconf files are re-included in the same runtime, after the caches were cleared.

This issue does not impact external code in any way, until you actually need to use these type converters early in the runtime. Indeed, the property mapper will then throw a DuplicateTypeConverterException because Extbase default type converters were registered twice.

Envisaged solution

Make the global array containing the type converters class names use unique values.

This won't affect the current behaviour of the DuplicateTypeConverterException which is meant for type converters of different classes with the same targets.

Actions #1

Updated by Gerrit Code Review over 6 years 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/54263

Actions #2

Updated by Gerrit Code Review about 6 years 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/54263

Actions #3

Updated by Gerrit Code Review about 6 years ago

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

Actions #4

Updated by Romain Canon about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF