Project

General

Profile

Actions

Bug #50551

closed

The itemsProcFunc configuration array has wrong pid from the 2nd content element on a page

Added by Tobias Klepp almost 11 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2013-07-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
5.3
Tags:
Complexity:
hard
Is Regression:
Sprint Focus:

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.


Files

flexParentDatabaseRow.png (4.89 KB) flexParentDatabaseRow.png Andreas Kalkhoff, 2021-10-28 14:40

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #95814: The itemsProcFunc configuration array has wrong pid from the 2nd content element on a pageNew2021-10-29

Actions
Actions

Also available in: Atom PDF