Project

General

Profile

Actions

Bug #83870

closed

DataHandler::clearPrefixFromValue is missing the leading space in the regexp

Added by Wolfgang Klinger about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #83909: Unit test DataHandler->clearPrefixFromValue()Closed2018-02-15

Actions
Actions #1

Updated by Gerrit Code Review about 6 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

Actions #2

Updated by Gerrit Code Review about 6 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

Actions #3

Updated by Gerrit Code Review about 6 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

Actions #4

Updated by Gerrit Code Review about 6 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

Actions #5

Updated by Wolfgang Klinger about 6 years ago

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

Updated by Christian Kuhn about 6 years ago

  • Related to Task #83909: Unit test DataHandler->clearPrefixFromValue() added
Actions #7

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF