Bug #70297
closedStory #69617: FormEngine bugs
Placeholder config with default value of related record field fails
100%
Description
Just updated to 7.5, now i get many catchables like:
Core: Error handler (BE): PHP Warning: explode() expects parameter 2 to be string, array given in .../typo3/cms/typo3/sysext/backend/Classes/Form/FormDataTraverser.php line 140
backtrace attached.
The field config:
'type' => 'input',
'eval' => 'null,trim',
'placeholder' => '__row|detail_type|title',
'mode' => 'useOrOverridePlaceholder',
'default' => NULL
Files
Updated by Morton Jonuschat over 9 years ago
- Status changed from New to Needs Feedback
I'm already on that but I'm having trouble reproducing it. Can you provide a bit more detail about the TCA or maybe even a simple test extension that reproduces this?
Updated by Philipp Wrann over 9 years ago
The field detail_type is defined as select, that seems to be the problem, if it is defined as group|db everything works.
BUT then no onchange event is fired and i can not use the requestUpdate feature anymore.
Updated by Philipp Wrann over 9 years ago
If you change the relation type of sys_file_reference|uid_local to select it should break.
Updated by Morton Jonuschat over 9 years ago
Thanks, i'll try to reproduce with the added information
Updated by Frans Saris over 9 years ago
FormDataTraverser->getFieldValue()
doesn't handle nested relations correctly.
For instance when looking at sys_file_reference.title.placeholder = __row|uid_local|metadata|title
the uid_local is found but the the next step fetching the correct metadata record fails
Updated by Frans Saris over 9 years ago
Looks like the code can not find the correct metadata record. It always finds the first record from sys_file_metadata table.
edit looks like the reason for that is because I set the metadata value of sys_file to 1
Updated by Frans Saris over 9 years ago
Ok, looks like getRecordRow()
returns a flat db record where metadata holds only the reference count but getRelatedInlineFieldUids()
expects a value like "The value in the local table (normally a comma separated list of the inline record UIDs)."
Updated by Morton Jonuschat over 9 years ago
- Status changed from Needs Feedback to In Progress
- Assignee set to Morton Jonuschat
- Priority changed from Should have to Must have
Updated by Gerrit Code Review over 9 years ago
- Status changed from In Progress 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/43795
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43748
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43748
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43748
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0b29135f0d6288fc4c0ace97ca9664913fa447f8.
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed