Bug #20420
closedwizard_edit.php does'nt work in flexforms
0%
Description
with the if statement and the config array in the wizard_edit.php it's not possible to use the wizard in flexforms.
maybe its, possible to parse the flexform_ds.xml, get the field configuration and write the information back to the config array.
(issue imported from #M11081)
Files
Updated by Peter Niederlag about 12 years ago
- Target version deleted (
0)
Heavily untested but seems to work:
pn@delle:/usr/local/typo3_src_git/TYPO3_4-7 (TYPO3_4-7 *<>)$ git log -p -n1 commit e5d27885e7b09102d80de09625f46c87cd858adb Author: Peter Niederlag <netservice@niekom.de> Date: Thu Nov 15 16:14:47 2012 +0100 PATCH, wizard_edit.php Change-Id: I0819f3650600adf46ac881ccabe8152e9a6fb222 diff --git a/typo3/wizard_edit.php b/typo3/wizard_edit.php index 2637a91..e060da0 100644 --- a/typo3/wizard_edit.php +++ b/typo3/wizard_edit.php @@ -81,7 +81,8 @@ class SC_wizard_edit { $table = $this->P['table']; $field = $this->P['field']; t3lib_div::loadTCA($table); - $config = $GLOBALS['TCA'][$table]['columns'][$field]['config']; + //$config = $GLOBALS['TCA'][$table]['columns'][$field]['config']; + $config = $this->P['fieldConfig']; $fTable = $this->P['currentValue']<0 ? $config['neg_foreign_table'] : $config['foreign_table']; // Detecting the various allowed field type setups and acting accordingly.
Updated by Einar Gislason almost 12 years ago
Peter Niederlag wrote:
Heavily untested but seems to work:
[...]
Does not work for me. Using T3 4.5.17. The popup stil closes and the main function does not even seem to be run - only the init().
This is quite an annoying bug as I use flexforms quite often for my clients. Using the wizard's add, edit and suggest is essential. This also means these things should work within sections.
Kind regards, Einar
PS. This is what I am currently trying to get to work:
<contentElement> <TCEforms> <label>LLL:EXT:ftf_tabs/locallang_db.php:tt_content.pi_flexform.select_content</label> <config> <type>group</type> <internal_type>db</internal_type> <allowed>tt_content</allowed> <size>5</size> <maxitems>50</maxitems> <minitems>0</minitems> <show_thumbs>0</show_thumbs> <iconsInOptionTags>1</iconsInOptionTags> <wizards type="array"> <edit type="array"> <_POSITION>bottom</_POSITION> <type>popup</type> <title>Edit</title> <script>wizard_edit.php</script> <popup_onlyOpenIfSelected>1</popup_onlyOpenIfSelected> <icon>edit2.gif</icon> <JSopenParams>height=350,width=580,status=0,menubar=0,scrollbars=1</JSopenParams> </edit> </wizards> </config> </TCEforms> </contentElement>
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.4 (Backend)
- Is Regression set to No
Updated by Gerrit Code Review over 9 years ago
- Status changed from New 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/41469
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41469
Updated by Benni Mack over 9 years ago
- Status changed from Under Review to Rejected
This should work in cms7. Georg Ringer got it to work.
Updated by René Fritz about 8 years ago
- File EditController.patch EditController.patch added
See Bug #78422 which is this as new open bug.
This doesn't work in 7.6. The code in 8.4 seems to be the same.
TYPO3\CMS\Backend\Controller\Wizard\EditController::main() do some checks using TCA and some GET parameters. All checks are done using TCA configuration:
$config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
Unfortunately this will not work for flexforms because we need here the configuration of the flexform field, not the parent tt_content field (for example).
Attached is a patch. I see that as a proof of concept as it will not work with NEW records and the flexform handling is a bit un-generic. The comments in the code should that make clear.
Here's a flexform field for testing:
<settings.collections> <TCEforms> <label>LLL:EXT:cms/locallang_ttc.xlf:file_collections</label> <config type="array"> <type>group</type> <internal_type>db</internal_type> <allowed>sys_file_collection</allowed> <maxitems type="integer">999</maxitems> <minitems type="integer">1</minitems> <size type="integer">5</size> <wizards type="array"> <_VERTICAL type="integer">1</_VERTICAL> <edit type="array"> <type>popup</type> <title>Edit</title> <module type="array"> <name>wizard_edit</name> </module> <popup_onlyOpenIfSelected type="integer">1</popup_onlyOpenIfSelected> <icon>actions-open</icon> <JSopenParams>height=350,width=580,status=0,menubar=0,scrollbars=1</JSopenParams> </edit> </wizards> </config> </TCEforms> </settings.collections>
Updated by Sybille Peters over 6 years ago
- Related to Bug #78422: wizard_edit doesn't work in flexforms added