Project

General

Profile

Actions

Bug #78278

closed

Flexform Suggest Wizard delivers Error 500

Added by Joe Schäfer about 8 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2016-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Using the Suggest Wizard in Flexforms won't work (again).

The ajax call delivers an error 500:

Argument 3 passed to TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::overrideFieldNameAndConfigurationForFlexform() must be of the type array, boolean given,...

The current situation is as follows:

  • Plugin from custom extension with flexform with suggest wizard
  • In setup of plugin the wizard returns no results (inspector tells that error 500 is returned)

Files

bug_flexformvssuggestwizard.gif (547 KB) bug_flexformvssuggestwizard.gif Error is thrown in Backend Joe Schäfer, 2016-10-13 11:43
StackTrace500.html (10.9 KB) StackTrace500.html Error 500 stack trace Joe Schäfer, 2016-10-14 09:42
Actions #1

Updated by Wouter Wolters about 8 years ago

  • Status changed from New to Needs Feedback

Which version of TYPO3 CMS 7.6 are you using?

Actions #2

Updated by Joe Schäfer about 8 years ago

I actually use TYPO3 CMS 7.6.11

Actions #3

Updated by Wouter Wolters about 8 years ago

Ok thanks for reporting back. Are you able to get the stack trace of the 500 error?

Actions #4

Updated by Joe Schäfer about 8 years ago

Of course!
I attached the 500 stack trace (HTML, no error log since I don't have the server credentials with me right now).

I hope that helps.

Actions #5

Updated by Wouter Wolters about 8 years ago

I tried to reproduce this with a flexform on my dev system but I can't reproduce it.

Does this also happen when opening an existing record?

Actions #6

Updated by Joe Schäfer about 8 years ago

Yes. Also happens while editing an existing plugin.

My flexform looks like

<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <sheets>
        <sDEF>
            <ROOT>
                <TCEforms>
                    <sheetTitle>General</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <settings.matrixproducts.selectedProducts>
                        <exclude>1</exclude>
                        <label>Produkte</label>
                        <config>
                            <type>group</type>
                            <internal_type>db</internal_type>
                            <allowed>tx_matrixproducts_domain_model_product</allowed>
                            <foreign_table>tx_matrixproducts_domain_model_product</foreign_table>
                            <size>8</size>
                            <minitems>1</minitems>
                            <show_thumbs>1</show_thumbs>
                            <wizards>
                                <suggest>
                                    <type>suggest</type>
                                </suggest>
                            </wizards>
                        </config>
                    </settings.matrixproducts.selectedProducts>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>

By default the SuggestWizard searches in all pages, or not?

Actions #7

Updated by Johannes Schlier about 8 years ago

I'm having the same issue.
I'm also trying to add a suggest wizard and use TYPO3 7.6.11, but using PHP 5.5.9

Actions #8

Updated by Riccardo De Contardi almost 8 years ago

  • Status changed from Needs Feedback to New
Actions #9

Updated by Georg Ringer about 6 years ago

  • Status changed from New to Needs Feedback

I can't reproduce that on 8 or 9. can you retest there as well? thanks

Actions #10

Updated by Joe Schäfer about 6 years ago

Georg Ringer wrote:

I can't reproduce that on 8 or 9. can you retest there as well? thanks

Seems to work in 8 and 9 (w/ PHP 7.2).

Actions #11

Updated by Riccardo De Contardi about 6 years ago

@Joe Schäfer hi and thank you for your answer; do you think that this issue can be closed or is there still work to do on this topic? Thank you!

Actions #12

Updated by Joe Schäfer about 6 years ago

Since all stable Versions seem OK. I am fine with closing this task/bug.

Actions #13

Updated by Wouter Wolters about 6 years ago

  • Status changed from Needs Feedback to Closed

Closed as reporter reports it works in latest versions

Actions #14

Updated by Rémy DANIEL about 5 years ago

I'm reproducing the error in a flexform generated by the form framework (TYPO3 8.7.29).
I get the error when I'm overriding the finisher "Redirect" in the form plugin.
I can't use the wizard to select a page: the ajax request fails with this exception:

#1480609491: Specified path settings.finishers.Redirect.pageUid not found in flex form data structure 

Debugging the error, I see that the "parsedBody" received by \TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController::searchAction looks like:

array(10 items)
   tableName => 'tt_content' (10 chars)
   fieldName => 'pi_flexform' (11 chars)
   uid => '3586' (4 chars)
   pid => '350' (3 chars)
   dataStructureIdentifier => array(6 items)
      type => 'tca' (3 chars)
      tableName => 'tt_content' (10 chars)
      fieldName => 'pi_flexform' (11 chars)
      dataStructureKey => '*,form_formframework' (20 chars)
      ext-form-persistenceIdentifier => 'EXT:site_emploi/Resources/Private/Forms/JobOfferDeposit.form.yaml' (65 chars)
      ext-form-overrideFinishers => 'true' (4 chars)
   flexFormSheetName => '6f027a34140a44b2c9bb14870e287807' (32 chars)
   flexFormFieldName => 'settings.finishers.Redirect.pageUid' (35 chars)
   flexFormContainerName => '' (0 chars)
   flexFormContainerFieldName => '' (0 chars)
   value => '479' (3 chars)

In the source code, the FlexFormTools parses the data structure from the dataStructureIdentifier and gets this:

array(1 item)
   sheets => array(1 item)
      sDEF => array(1 item)
         ROOT => array(3 items)
            TCEforms => array(1 item)
            type => 'array' (5 chars)
            el => array(2 items)
               settings.persistenceIdentifier => array(1 item)
               settings.overrideFinishers => array(1 item)
                  TCEforms => array(4 items)
                     label => 'LLL:EXT:form/Resources/Private/Language/Database.xlf:tt_content.pi_flexform.formframework.overrideFinishers' (107 chars)
                     displayCond => 'FIELD:settings.persistenceIdentifier:REQ:TRUE' (45 chars)
                     onChange => 'reload' (6 chars)
                     config => array(1 item)max depth

The field settings.finishers.Redirect.pageUid is obviously not present is the parsed datastructure.

Something is missing between the flexform built by ext:form when editing the content, and the flexform parsed by the SuggestWizardController. Maybe the Flexform hook provided by ext:form is incomplete.

Actions

Also available in: Atom PDF