Actions
Bug #83870
closedDataHandler::clearPrefixFromValue is missing the leading space in the regexp
Status:
Closed
Priority:
Must have
Assignee:
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2018-02-13
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
The result is, that if you copy or duplicate (with the new upcoming 'Duplicate' feature) a record the prependAtCopy postfix is not increased as expected.
Here's the detailed explanation:
Duplicated page header: 'Test (copy 6)'
the regexp of cleaPrefixFromValue returns: 'Test ' (with an additional space)
$count = 0 in the first run
database query executed:
SELECT COUNT FROM `tt_content` WHERE (`pid` = 2) AND (`header` = 'Test ') AND (`tt_content`.`deleted` = 0)
$rowCount -> 1 (the original page matches with title 'Test')
getCopyHeader is called again (recursively)
parameters: $count = 1, $value = 'Test '
$checkTitle is constructed as 'Test (copy 1)' with a space too much
and therefore no further pages with (copy X) postfixes are found.
Actions