Bug #83870
closedDataHandler::clearPrefixFromValue is missing the leading space in the regexp
100%
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.
Updated by Gerrit Code Review almost 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/55694
Updated by Gerrit Code Review almost 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/55694
Updated by Gerrit Code Review almost 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/55694
Updated by Gerrit Code Review almost 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/55694
Updated by Wolfgang Klinger almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 85aa8905c17c9ca83a2931c5f959ba39f8a98471.
Updated by Christian Kuhn almost 7 years ago
- Related to Task #83909: Unit test DataHandler->clearPrefixFromValue() added