Bug #73864
closedSuggest wizard dont work for unsaved records using flexforms
100%
Description
Hi,
we use the suggest wizard in a flexform. When the record is unsaved, then the suggest wizard returns no results. On saved records it works successfully.
After some debuggings in the core (\TYPO3\CMS\Backend\Form\Wizard\SuggestWizard::searchAction()
) it seems that $fieldConfig
is empty after calling the function overrideFieldNameAndConfigurationForFlexform
in that case for unsaved records.
Updated by Nicole Cordes almost 9 years ago
- Status changed from New to Accepted
- Assignee set to Nicole Cordes
Updated by Nicole Cordes almost 9 years ago
This can be tested with the felogin plugin and its redirects for example.
Updated by Gerrit Code Review almost 9 years ago
- Status changed from Accepted 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 https://review.typo3.org/47223
Updated by Markus Klein almost 9 years ago
- Category set to FormEngine aka TCEforms
- Target version set to 7.6.5
- Sprint Focus set to Stabilization Sprint
Stefan, please test the patch linked above. Login with your typo3 credentials and vote then using the "Reply" button on Gerrit (review.typo3.org).
Thanks.
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47235
Updated by Nicole Cordes almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 11e3f9c120f3ef747965b13a2bd34b2adab3b23f.
Updated by Stefan Berger almost 9 years ago
Hi Nicole, hi Markus,
sorry, but I can’t confirm that patch working for me.
We use the flex form in a gridelement, but that should doesn’t matter.
I’ve done again some debuggings there and here are that values I’ve got at the end in the function overrideFieldNameAndConfigurationForFlexform.
$flexfieldTCAConfig:
array ( 'type' => 'flex', 'ds_pointerField' => 'list_type,CType', 'ds' => array ( 'default' => ' <T3DataStructure> <ROOT> <type>array</type> <el> <!-- Repeat an element like "xmlTitle" beneath for as many elements you like. Remember to name them uniquely --> <xmlTitle> <TCEforms> <label>The Title:</label> <config> <type>input</type> <size>48</size> </config> </TCEforms> </xmlTitle> </el> </ROOT> </T3DataStructure> ', '*,table' => 'FILE:EXT:css_styled_content/flexform_ds.xml', '*,login' => 'FILE:EXT:felogin/Configuration/FlexForms/Login.xml', '*,gridelements_pi1' => '', 'powermail_pi1,list' => 'FILE:EXT:powermail/Configuration/FlexForms/FlexformPi1.xml', 'powermail_pi2,list' => 'FILE:EXT:powermail/Configuration/FlexForms/FlexformPi2.xml', ), 'search' => array ( 'andWhere' => 'CType=\'list\'', ), ),
$flexformDSArray:
array ( 'sheets' => array ( 'sDEF' => array ( 'ROOT' => array ( 'el' => array ( 'field_content' => array ( 'TCEforms' => array ( 'config' => array ( 'type' => 'none', ), ), ), ), ), ), ), ),
$flexformElement:
'eventlink',
$fieldConfig:
array ( ),
Hope that helps for fixing that case. Thanks for investigating that bug.
Updated by Nicole Cordes almost 9 years ago
Hi Stefan,
are you sure that gridelements is doing the right things here? I have no experience with that but I can surly say that your results are wrong. So I would guess that the incoming data is already wrong. Can you post the html of the field, please.
Updated by Stefan Berger almost 9 years ago
Hi Nicole,
mmh, I just don't know. When my flexform works for saved records, so I think my flexform is not buggy.
Here is the rendered html of the form element:
<div class="form-section"> <div class="form-group t3js-formengine-palette-field t3js-formengine-validation-marker"> <label class="t3js-formengine-label"> Link zur Veranstaltung </label> <div class="t3js-formengine-field-item"> <div class="form-wizards-wrap form-wizards-bottom"> <div class="form-wizards-element"> <input class="t3js-group-hidden-field" data-formengine-input-name="data[tt_content][NEW56e68df5b176d201043825][pi_flexform][data][sDEF][lDEF][eventlink][vDEF]" value="0" type="hidden"> <div class="form-wizards-wrap form-wizards-aside"> <div class="form-wizards-element"> <select id="tceforms-multiselect-56e68df5d434c120313480" size="1" class="form-control tceforms-multiselect" data-formengine-input-name="data[tt_content][NEW56e68df5b176d201043825][pi_flexform][data][sDEF][lDEF][eventlink][vDEF]" data-formengine-validation-rules="[{"type":"group","minItems":0,"maxItems":1}]"></select> <div class="help-block"> <a href="#" onclick="setFormValueOpenBrowser('db', 'data[tt_content][NEW56e68df5b176d201043825][pi_flexform][data][sDEF][lDEF][eventlink][vDEF]|||tx_weszfuevents_domain_model_event'); return false;" class="btn btn-default"> <span class="t3js-icon icon icon-size-small icon-state-default icon-tcarecords-tx_weszfuevents_domain_model_event-default" data-identifier="tcarecords-tx_weszfuevents_domain_model_event-default"> <span class="icon-markup"> <img src="/typo3conf/ext/wes_zfu_events/Resources/Public/Icons/tx_weszfuevents_domain_model_event.gif" width="16" height="16"> </span> </span> Event </a> </div> </div> <div class="form-wizards-items"> <div class="btn-group-vertical"> <a href="#" class="btn btn-default t3-btn-removeoption" onclick="" data-fieldname="data[tt_content][NEW56e68df5b176d201043825][pi_flexform][data][sDEF][lDEF][eventlink][vDEF]" title="Remove selected items"> <span class="t3js-icon icon icon-size-small icon-state-default icon-actions-selection-delete" data-identifier="actions-selection-delete"> <span class="icon-markup"> <img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-selection-delete.svg" width="16" height="16"> </span> </span> </a> </div> </div> </div> <input name="data[tt_content][NEW56e68df5b176d201043825][pi_flexform][data][sDEF][lDEF][eventlink][vDEF]" value="" type="hidden"> </div> <div class="form-wizards-items"> <div class="autocomplete t3-form-suggest-container"> <div class="input-group"> <span class="input-group-addon"> <span class="t3js-icon icon icon-size-small icon-state-default icon-actions-search" data-identifier="actions-search"> <span class="icon-markup"> <img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-search.svg" width="16" height="16"> </span> </span> </span> <input autocomplete="off" class="t3-form-suggest form-control" placeholder="Find records" data-fieldname="data[tt_content][NEW56e68df5b176d201043825][pi_flexform][data][sDEF][lDEF][eventlink][vDEF]" data-table="tt_content" data-field="pi_flexform|data|sDEF|lDEF|eventlink|vDEF" data-uid="NEW56e68df5b176d201043825" data-pid="-1351" data-fieldtype="group" data-minchars="2" data-recorddata="a:70:{s:6:"colPos";a:1:{i:0;s:2:"-1";}s:16:"sys_language_uid";a:1:{i:0;s:1:"0";}s:5:"CType";a:1:{i:0;s:16:"gridelements_pi1";}s:25:"tx_gridelements_container";a:1:{i:0;s:4:"1023";}s:23:"tx_gridelements_columns";a:1:{i:0;s:2:"13";}s:30:"tx_gridelements_backend_layout";a:1:{i:0;s:1:"8";}s:3:"pid";i:-1351;s:3:"uid";s:25:"NEW56e68df5b176d201043825";s:8:"editlock";s:0:"";s:6:"hidden";s:0:"";s:9:"starttime";s:1:"0";s:7:"endtime";s:1:"0";s:8:"fe_group";a:0:{}s:11:"l18n_parent";a:1:{i:0;s:1:"0";}s:6:"layout";a:1:{i:0;s:1:"0";}s:4:"date";s:1:"0";s:6:"header";s:0:"";s:14:"rowDescription";s:0:"";s:11:"header_link";s:0:"";s:13:"header_layout";a:1:{i:0;s:1:"0";}s:9:"subheader";s:0:"";s:8:"bodytext";s:0:"";s:5:"image";s:0:"";s:10:"imagewidth";s:1:"0";s:11:"imageheight";s:1:"0";s:11:"imageorient";s:1:"0";s:11:"imageborder";s:0:"";s:10:"image_zoom";s:0:"";s:9:"imagecols";s:1:"2";s:4:"cols";s:1:"0";s:5:"pages";s:0:"";s:9:"recursive";s:1:"0";s:9:"menu_type";s:1:"0";s:9:"list_type";s:0:"";s:10:"select_key";s:0:"";s:16:"file_collections";s:0:"";s:5:"media";s:0:"";s:13:"filelink_size";s:0:"";s:16:"filelink_sorting";s:0:"";s:6:"target";s:0:"";s:7:"records";s:0:"";s:12:"sectionIndex";s:1:"1";s:9:"linkToTop";s:0:"";s:11:"pi_flexform";a:2:{s:4:"data";a:1:{s:4:"sDEF";a:1:{s:4:"lDEF";a:5:{s:4:"logo";a:1:{s:4:"vDEF";s:0:"";}s:5:"image";a:1:{s:4:"vDEF";s:0:"";}s:8:"pretitle";a:1:{s:4:"vDEF";s:0:"";}s:9:"eventlink";a:1:{s:4:"vDEF";s:0:"";}s:7:"altlink";a:1:{s:4:"vDEF";s:0:"";}}}}s:4:"meta";a:0:{}}s:17:"tx_impexp_origuid";s:0:"";s:19:"accessibility_title";s:0:"";s:20:"accessibility_bypass";s:0:"";s:25:"accessibility_bypass_text";s:0:"";s:15:"l18n_diffsource";s:0:"";s:11:"t3ver_label";s:0:"";s:19:"selected_categories";s:0:"";s:14:"category_field";s:0:"";s:13:"table_caption";s:0:"";s:15:"table_delimiter";s:3:"124";s:15:"table_enclosure";s:1:"0";s:21:"table_header_position";s:1:"0";s:11:"table_tfoot";s:1:"0";s:10:"categories";a:0:{}s:15:"header_position";a:0:{}s:17:"image_compression";s:0:"";s:13:"image_effects";s:0:"";s:12:"image_noRows";s:0:"";s:13:"section_frame";a:1:{i:0;s:1:"0";}s:10:"spaceAfter";s:1:"0";s:11:"spaceBefore";s:1:"0";s:13:"table_bgColor";s:1:"0";s:12:"table_border";s:1:"0";s:17:"table_cellpadding";s:1:"0";s:17:"table_cellspacing";s:1:"0";s:24:"tx_gridelements_children";s:0:"";}" type="search"> </div> <div style="position: absolute; display: none; max-height: 300px; z-index: 9999;" class="autocomplete-results"></div> </div> </div> </div> </div> </div> </div>
Here is the flexform xml for the field:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <T3DataStructure> <meta> <langDisable>1</langDisable> </meta> <ROOT> <type>array</type> <el> <eventlink> <TCEforms> <label>LLL:fileadmin/locallang/gridelements/maincolumn_container_slider_item.xml:eventlink</label> <config> <type>group</type> <internal_type>db</internal_type> <allowed>tx_weszfuevents_domain_model_event</allowed> <size>1</size> <maxitems>1</maxitems> <minitems>0</minitems> <show_thumbs>0</show_thumbs> <disable_controls>upload,browser,delete</disable_controls> <wizards> <_PADDING>1</_PADDING> <_VERTICAL>0</_VERTICAL> <_POSITION>bottom</_POSITION> <suggest> <type>suggest</type> <default> <searchWholePhrase>1</searchWholePhrase> <additionalSearchFields>eventcode</additionalSearchFields> </default> </suggest> </wizards> </config> </TCEforms> </eventlink> </el> </ROOT> </T3DataStructure>
Maybe you could show me the fault, if there is any.
Updated by Nicole Cordes almost 9 years ago
Hi Stefan,
may I invite you to slack (https://forger.typo3.org/slack) to discuss your environment and find a solution for your problem?
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed