#50551The itemsProcFunc configuration array has wrong pid from the 2nd content element on a page
Description
I use in my plugin flexform definition an items proc function to generate my items in a special way.
<tags>
<TCEforms>
<exclude>1</exclude>
<label>LLL:EXT:extkey/locallang_db.xml:tt_content.pi_flexform.tags</label>
<config>
<type>select</type>
<foreign_table>tx_extkey_tags</foreign_table>
<foreign_table_where>ORDER BY tx_extkey_tags.sorting</foreign_table_where>
<size>5</size>
<minitems>0</minitems>
<maxitems>99</maxitems>
<itemsProcFunc>tx_extkey_tca->addTagItems</itemsProcFunc>
</config>
</TCEforms>
</tags>
The class looks like this:
final class tx_extkey_tca {
public function addTagItems($config) {
var_dump($config);
return $config;
}
}
If I add the plugin as the first content element on a page, the $config array look fine. $config[‘row’][‘pid’] is set to the current page id.
If I add the plugin a second time or more in the same page, $config[‘row’][‘pid’] is not set to the current page id. It is a strange negative value like -67.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.