Project

General

Profile

Actions

Bug #81773

closed

Empty constants are not correct replaced after Patch

Added by Pascal Hinz over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2017-07-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
On Location Sprint

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

Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Susanne Moog over 7 years ago

  • Sprint Focus set to On Location Sprint
Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

Updated by Pascal Hinz over 7 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF