Bug #70297
closed
Story #69617: FormEngine bugs
Placeholder config with default value of related record field fails
Added by Philipp Wrann almost 9 years ago.
Updated almost 7 years ago.
Category:
FormEngine aka TCEforms
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
- 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?
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.
If you change the relation type of sys_file_reference|uid_local to select it should break.
Thanks, i'll try to reproduce with the added information
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
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
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)."
- Parent task set to #69617
- Status changed from Needs Feedback to In Progress
- Assignee set to Morton Jonuschat
- Priority changed from Should have to Must have
- 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
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
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
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
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF