#83870DataHandler::clearPrefixFromValue is missing the leading space in the regexp
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.