Bug #70297

Story #69617: FormEngine bugs

Placeholder config with default value of related record field fails

Added by Philipp Wrann about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Category:
FormEngine aka TCEforms
Target version:
Start date:
2015-10-02
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

trace.txt View (6.64 KB) Philipp Wrann, 2015-10-02 10:39


Related issues

Related to TYPO3 Core - Bug #70146: Input placeholder record traversal is broken Closed 2015-09-28

Associated revisions

Revision 0b29135f (diff)
Added by Markus Klein about 4 years ago

[BUGFIX] FormDataTraverser must check data type before explode()

Resolves: #70297
Releases: master
Change-Id: Ied26fe591fc4b20df7d50a51cf2ce3dc3b2e025d
Reviewed-on: http://review.typo3.org/43795
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 13177fa0 (diff)
Added by Morton Jonuschat about 4 years ago

[TASK] FormEngine: Replace placeholder resolving with a data provider

Resolving of placeholder for field types text and input has been moved
from the element rendering into the form data providers. The data
provider approach allows reuse of existing providers and data groups and
reduces the amount of database queries by having access to previously
parsed data.

Resolves: #70370
Resolves: #70146
Resolves: #70297
Releases: master
Change-Id: I05fa2c6d3237e65627cae74811d1a9202e3ac0c8
Reviewed-on: http://review.typo3.org/43748
Reviewed-by: Frank Nägler <>
Tested-by: Frank Nägler <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Morton Jonuschat about 4 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?

#2 Updated by Philipp Wrann about 4 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.

#3 Updated by Philipp Wrann about 4 years ago

If you change the relation type of sys_file_reference|uid_local to select it should break.

#4 Updated by Morton Jonuschat about 4 years ago

Thanks, i'll try to reproduce with the added information

#5 Updated by Frans Saris about 4 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

#6 Updated by Frans Saris about 4 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

#7 Updated by Frans Saris about 4 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)."

#8 Updated by Christian Kuhn about 4 years ago

  • Parent task set to #69617

#9 Updated by Morton Jonuschat about 4 years ago

  • Status changed from Needs Feedback to In Progress
  • Assignee set to Morton Jonuschat
  • Priority changed from Should have to Must have

#10 Updated by Gerrit Code Review about 4 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

#11 Updated by Gerrit Code Review about 4 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

#12 Updated by Gerrit Code Review about 4 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

#13 Updated by Gerrit Code Review about 4 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

#14 Updated by Markus Klein about 4 years ago

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

#15 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF