Task #69730

Story #69712: Further FormEngine development

Remove dot in uniqid('NEW', TRUE)

Added by Christian Kuhn about 5 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
Start date:
2015-09-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

DatabaseUniqueUidNewRow creates a "dummy" uid for new records. This is given to the DataHandler later, it then persists the new row and substitutes this placeholder with the real uid somehow.

Problem is, that the call uniqid('NEW', TRUE) creates a string like "NEW12345678.1234567". Mind the dot. This is triggered by the second argument as TRUE and makes sure that if uniqid() is called multiple times on windows, still a different result is returned. So, TRUE must be kept.

But: The dot is not a valid character in html attributes like id. so id="NEW123.456" is invalid and gives headaches. Thus, there are some places hidden somewhere in element and container classes within FormEngine, that remove this dot again, if this one is used as id or at other places in DOM.

Task is: Do the removal of the dot in DatabaseUniqueUidNewRow once and for all, locate all within FormEngine that currently does that manually and remove these hacks.


Related issues

Related to TYPO3 Core - Bug #91553: Risk of non-unique field in DatePickerViewHelperResolved2020-06-02

Actions
Follows TYPO3 Core - Task #69050: Supply a Utility method to create unique ids in the coreClosedNicole Cordes2015-08-14

Actions
#1

Updated by Stephan Großberndt about 5 years ago

there are several other places in core where uniqid() is called. this should be unified in general to produce generic unique ids usable as well for html as js as mysql identifiers

#2

Updated by Nicole Cordes about 5 years ago

  • Assignee set to Nicole Cordes
#3

Updated by Gerrit Code Review about 5 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 http://review.typo3.org/43244

#4

Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43244

#5

Updated by Nicole Cordes about 5 years ago

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

Updated by Anja Leichsenring almost 5 years ago

  • Sprint Focus deleted (On Location Sprint)
#7

Updated by Riccardo De Contardi about 3 years ago

  • Status changed from Resolved to Closed
#8

Updated by Stephan Großberndt 6 months ago

  • Related to Bug #91553: Risk of non-unique field in DatePickerViewHelper added

Also available in: Atom PDF