Bug #84575

Fluid autocomplete widget not working anymore

Added by Daniel Widmer over 2 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2018-04-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Problem
The autocomplete widget in below frontend template worked well in TYPO3 CMS 8.7.9. After updating the core to 8.7.10, no autocomplete suggestions are shown anymore. With downgrading and updating between 8.7.9 and 8.7.10 this problem can be reproduced every time. It also does not work in versions 8.7.11 and 8.7.12.

Template HTML

<f:form class="form-horizontal" name="filter" action="list">
  <div class="row">
    <div class="form-group">
      <label for="lastname" class="col-md-4 control-label">Name</label>
      <div class="col-md-8">
        <f:form.textfield name="name" id="name" value="{filter.name}" class="form-control" />
        <f:widget.autocomplete for="name" objects="{allPeople}" searchProperty="name" />
        <script type="text/javascript">
          jQuery(function() {
            jQuery("#name").autocomplete({
              select:function(event, ui) {
                this.form.name.value = ui.item.value;
                this.form.submit();
              }
            });
          });
        </script>
      </div>
    </div>
    <div class="form-group">
      <div class="col-md-8 col-md-offset-4">
        <f:form.submit value="Suchen" class="btn btn-primary" />
      </div>
    </div>
  </div>
</f:form>

Additional information
In the version 8.7.10 release notes I found that typo3fluid/fluid was updated to 2.5.0 (a8da855525). However, I did not find relevant changes in the corresponding fluid viewhelper PHP files neither any documentation concerning changes in thie viewhelper widget.


Related issues

Related to TYPO3 Core - Bug #73207: Changing the Template of a fluid widget does not workClosed2016-02-10

Actions
Related to TYPO3 Core - Task #90091: Update Autocomplete widget template ajax urlClosed2020-01-12

Actions
Related to TYPO3 Core - Bug #90753: widget autocomplete url has still wrong masking with &amp;Closed2020-03-13

Actions
#1

Updated by Michael Stucki over 2 years ago

  • Project changed from forge.typo3.org to TYPO3 Core
  • TYPO3 Version set to 9

Wrong project

#2

Updated by Daniel Widmer over 2 years ago

Meanwhile I am one step further. I previously used a customized template for the autocomplete widget which has "->f:format.raw()" added to the ajax source address:

<script type="text/javascript">
jQuery(function() {
  jQuery("#{id}").autocomplete(<f:format.raw value="{" />
    source: "{f:widget.uri(action:'autocomplete', ajax: 1)->f:format.raw()}",
    minLength: 3
  });
});
</script>

Without that, the address is used with & instead of & which seems to hinder the autocomplete feature to work.
The reason why autocomplete does not work when updating the core from 8.7.9 to 8.7.10 is that the typoscript

config.tx_extbase.view.widget.TYPO3\CMS\Fluid\ViewHelpers\Widget\AutocompleteViewHelper.templateRootPaths.10 = fileadmin/templates/fluid_styled_content/Templates/

seems to have no longer an effect -- the template html file of the core is alyways used, not my customized one. Is this maybe related to Bug #73207?

#3

Updated by Riccardo De Contardi over 2 years ago

  • Category set to Fluid
#4

Updated by Riccardo De Contardi over 2 years ago

  • Related to Bug #73207: Changing the Template of a fluid widget does not work added
#5

Updated by Claus Due 9 months ago

  • Status changed from New to Needs Feedback

Please confirm if this is still an issue. We have received no other reports so this could potentially either be solved without marking this issue as closed, or could depend on a specific context that is not described in this issue.

Diff between 8.7.9 and 8.7.10 shows only two patches related to Fluid:

  • Bump of version to 2.5.0
  • A fix for recursive FLUIDTEMPLATE objects

Diff for TYPO3 CMS: https://github.com/TYPO3/TYPO3.CMS/compare/v8.7.9...8.7.10
Diff for Fluid: https://github.com/TYPO3/Fluid/compare/2.4.3...2.5.0
Patch for FLUIDTEMPLATE: https://github.com/TYPO3/TYPO3.CMS/commit/dbf5f643b5fe9574eb204708b9dc77b404a26f68 (relevant if my perception is correct that this is an override template for FSC, which uses FLUIDTEMPLATE for rendering)

Please confirm if this is still a problem in more recent releases of TYPO3 8.7.

#7

Updated by Daniel Widmer 9 months ago

After I updated from 8.7.30 to 8.7.31, I still have this issue, but I realized that now it caused by a typo in the path name of my own template. After correcting this, the problem is solved.

#8

Updated by Riccardo De Contardi 9 months ago

Daniel Hinderink Widmer thank you for your reply; is there still something to do or can we consider this issue closed? Thank you!

#9

Updated by Susanne Moog 9 months ago

  • Related to Task #90091: Update Autocomplete widget template ajax url added
#10

Updated by Susanne Moog 9 months ago

  • Related to Bug #90753: widget autocomplete url has still wrong masking with &amp; added
#11

Updated by Daniel Widmer 9 months ago

From my point of view the issue can be closed.

#12

Updated by Bjoern Jacob 9 months ago

  • Status changed from Needs Feedback to Closed

Closed as requested. Thanks for your feedback.

Also available in: Atom PDF