Bug #81773
closedEmpty constants are not correct replaced after Patch
100%
Description
After the Patch (https://github.com/TYPO3/TYPO3.CMS/commit/ac9baec4461c232e1a88d181da14f53f6146a8d5) "Prevent different constants marker in TS parsing" empty constants are not replaced correct.
The markers (##11f99e_B####11f99e_E##) are left after the replacing process and are visible in the TypoScript Template ObjectBrowser (see screenshots).
It seems that the bug doesn't have any effects on the functionality of the TYPO3 instance.
How to reproduce:
1 ) Open the Typoscript ObjectBrowser in the setup mode
2) Disable the option "Crop lines"
3) Select "Substituted constants in green"
4) Type in the search "_B##" and you will find in the result something like "##64e3d7_B####64e3d7_E##"
How to fix:
1) Just fix the regular expression in the ExtendedTemplateService.php
TYPO3 7.6.19
File: typo3_src-7.6.19/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php (line 320):
Replace: '/##[a-z0-9]{6}_B##((?:(?!##[a-z0-9]{6}_E##).)+)##[a-z0-9]{6}_E##/',
With: '/##[a-z0-9]{6}_B##((?:(?!##[a-z0-9]{6}_E##).)+)?##[a-z0-9]{6}_E##/',
TYPO3 8.7.2
File: typo3_src-8.7.2/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php (line 316)
Replace: '/##[a-z0-9]{6}_B##((?:(?!##[a-z0-9]{6}_E##).)+)##[a-z0-9]{6}_E##/',
With: '/##[a-z0-9]{6}_B##((?:(?!##[a-z0-9]{6}_E##).)+)?##[a-z0-9]{6}_E##/',
I'll try to make a patch for the bug.
Files
Updated by Gerrit Code Review over 7 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/53410
Updated by Gerrit Code Review over 7 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/53410
Updated by Gerrit Code Review over 7 years 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/53410
Updated by Gerrit Code Review over 7 years 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/53410
Updated by Gerrit Code Review over 7 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/53491
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53492
Updated by Pascal Hinz over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 77ca1b03ed482e1032efbddc7fd05cc190c875ad.