Bug #22643
closedSymmetric biderectional records, does not work with type=group
0%
Description
I have configures a relation from the pages table to itself using an irre and the following configuration
"config" => Array (
"type"=>"inline",
"foreign_table"=>"tx_ksrelatedpages_pages_relations",
"foreign_field"=>"page",
"foreign_label"=>"related",
"foreign_sortby"=>"related_sorting",
"symmetric_field" => "related",
"symmetric_label"=>"page",
"symmetric_sortby"=>"page_sorting"
)
This works fine if the relationstable (tx_ksrelatedpages_pages_relations) is has the page and related fields defined as type="select", but does not work for type="group"
The problem is identified to the t3lib_loadDBGroup::isOnSymmetricSide methods which makes a check to see if the value from the relations page points to the record currently being edited bu using a simple == operator.
But for type=group, the field is not stored as an integer, but stored as pages_43|Title of my page, and thus the method returns false always.
The attached patch fixes this by making a check to see if the field is an integer, and if not, tries to parse it correctly
The problem appears on all versions of TYPO3 since IRRE was introduces, including 4.3.3
(issue imported from #M14378)
Files