Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using flexParentDatabaseRow in userFunc or itemsProcFunc does not work with compatibility6 #15

Closed
sypets opened this issue Aug 9, 2017 · 0 comments

Comments

@sypets
Copy link
Contributor

sypets commented Aug 9, 2017

Problem description

The breaking change no 70132 ("FormEngine custom functions") in the TYPO3 core 7.6 suggests using 'flexParentDatabaseRow' instead of 'row' for retrieving the full parent database row in a userFunc / itemsProcFunc.

https://wiki.typo3.org/TYPO3.CMS/Releases/7.6/Breaking#Breaking:_.2370132_-_FormEngine_custom_functions

This will not work, if compatibility6 is installed.

Reproduce

  1. Use current 7.6 installation (e.g. introduction package)
  2. Install compatibility6
  3. Install current tt_address version 4.0.0 as an example (any other extension which uses this functionality will reproduce the same results)
  4. Create an address plugin content
  5. Add tt_address static includes and for example the following typoscript
plugin.tx_ttaddress_pi1 {
    templatePath = fileadmin/template/ext/tt_address/
    defaultTemplateFileName = default_hcard.htm
 }
  1. Create several template files to choose from, e.g.
mkdir -p fileadmin/template/ext/tt_address/
cp typo3conf/ext/tt_address/res/default_hcard.htm fileadmin/template/ext/tt_address/
cp typo3conf/ext/tt_address/res/default_hcard.htm  fileadmin/template/ext/tt_address/default_hcard2.htm
  1. Edit the address plugin and click on "Plugin option" : "Display" : "Template"

Expected result

A dropdown list should appear with the 2 available files.

Actual result

Only default item in list displayed.

Confirm

Deinstall compatibility6 and try again

Reason for problem

https://github.com/FriendsOfTYPO3/tt_address/blob/60eed630ee66663e63422f9f89949bb5896e4731/Classes/Hooks/Tca/AddFilesToSelector.php#L41

$params['flexParentDatabaseRow']['pid'] will be empty. The same problem appears in other extensions if they use the same mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant