[Frage] Fluuid Template wirft Fehler bei Indexed search Integration TYPO3-Version: -

  • Stefan80 Stefan80
    T3PO
    0 x
    13 Beiträge
    1 Hilfreiche Beiträge
    05. 10. 2020, 09:50

    Meine Typo3 und Indexed Search Engine Version: 10.4.6

    Ich habe ein Fluid Template in dem ich einen Partial mit dem Inhalt des Fluid Code des Indexed Search Form Partial Form.html erstellt habe.

    Hier ein Teil des Codes:

    [code]<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
    <div class="tx-indexedsearch-searchbox">
    <f:form action="search" method="post" id="tx_indexedsearch" pageUid="{settings.targetPid}">[/code]
    <div class="tx-indexedsearch-hidden-fields">
    <f:form.hidden name="search[_sections]" value="0" />
    <f:form.hidden name="search[_freeIndexUid]" id="tx_indexedsearch_freeIndexUid" value="_" />[/code]
    [code]<f:form.hidden name="search[pointer]" id="tx_indexedsearch_pointer" value="0" />[/code]
    [code]<f:form.hidden name="search[ext]" value="{searchParams.ext}" />[/code]
    [code]<f:form.hidden name="search[searchType]" value="{searchParams.searchType}" />[/code]
    [code]<f:form.hidden name="search[defaultOperand]" value="{searchParams.defaultOperand}" />[/code]
    [code]<f:form.hidden name="search[mediaType]" value="{searchParams.mediaType}" />[/code]
    [code]<f:form.hidden name="search[sortOrder]" value="{searchParams.sortOrder}" />[/code]
    [code]<f:form.hidden name="search[group]" value="{searchParams.group}" />[/code]
    [code]<f:form.hidden name="search[languageUid]" value="{searchParams.languageUid}" />[/code]
    [code]<f:form.hidden name="search[desc]" value="{searchParams.desc}" />[/code]
    [code]<f:form.hidden name="search[numberOfResults]" value="{searchParams.numberOfResults}" />[/code]
    [code]<f:form.hidden name="search[extendedSearch]" value="{searchParams.extendedSearch}" />[/code]
    [code]</div>[/code]
    [code]<fieldset>[/code]
    [code]<legend><f:translate key="form.legend" /></legend>[/code]
    [code]<div class="tx-indexedsearch-form">[/code]
    [code]<label for="tx-indexedsearch-searchbox-sword"><f:translate key="form.searchFor" />:</label>[/code]
    [code]<f:form.textfield name="search[sword]" value="{sword}" id="tx-indexedsearch-searchbox-sword" class="tx-indexedsearch-searchbox-sword" />[/code]
    [code]</div>[/code]
    [code]<f:if condition="{searchParams.extendedSearch}">[/code]
    [code]<f:if condition="{showTypeSearch}">[/code]
    [code]<div class="tx-indexedsearch-search-for">[/code]
    [code]<label for="tx-indexedsearch-selectbox-searchtype"><f:translate key="form.match" />:</label>[/code]
    [code]<f:if condition="{allSearchTypes}">[/code]
    [code]<f:form.select name="search[searchType]" options="{allSearchTypes}" value="{searchParams.searchType}" id="tx-indexedsearch-selectbox-searchtype" class="tx-indexedsearch-selectbox-searchtype" />[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{allDefaultOperands}">[/code]
    [code]<f:form.select name="search[defaultOperand]" options="{allDefaultOperands}" value="{searchParams.defaultOperand}" id="tx-indexedsearch-selectbox-defaultoperand" class="tx-indexedsearch-selectbox-defaultoperand" />[/code]
    [code]</f:if>[/code]
    [code]</div>[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{showMediaAndLanguageSearch}">[/code]
    [code]<div class="tx-indexedsearch-search-in">[/code]
    [code]<label for="tx-indexedsearch-selectbox-media"><f:translate key="form.searchIn" />:</label>[/code]
    [code]<f:if condition="{allMediaTypes}">[/code]
    [code]<f:form.select name="search[mediaType]" options="{allMediaTypes}" value="{searchParams.mediaType}" id="tx-indexedsearch-selectbox-media" class="tx-indexedsearch-selectbox-media media" />[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{allLanguageUids}">[/code]
    [code]<f:form.select name="search[languageUid]" options="{allLanguageUids}" value="{searchParams.languageUid}" id="tx-indexedsearch-selectbox-lang" class="tx-indexedsearch-selectbox-lang lang" />[/code]
    [code]</f:if>[/code]
    [code]</div>[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{allSections}">[/code]
    [code]<div class="tx-indexedsearch-search-select-section">[/code]
    [code]<label for="tx-indexedsearch-selectbox-sections"><f:translate key="form.fromSection" />:</label>[/code]
    [code]<f:form.select name="search[sections]" options="{allSections}" value=" {searchParams.sections}" id="tx-indexedsearch-selectbox-sections" class="tx-indexedsearch-selectbox-sections" />[/code]
    [code]</div>[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{allIndexConfigurations}">[/code]
    [code]<div class="tx-indexedsearch-search-freeindexuid">[/code]
    [code]<label for="tx-indexedsearch-selectbox-freeIndexUid"><f:translate key="form.freeIndexUid" />:</label>[/code]
    [code]<f:form.select name="search[freeIndexUid]" options="{allIndexConfigurations}" value="{searchParams.freeIndexUid}" id="tx-indexedsearch-selectbox-freeIndexUid" class="tx-indexedsearch-selectbox-freeIndexUid" />[/code]
    [code]</div>[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{showSortOrders}">[/code]
    [code]<div class="tx-indexedsearch-search-select-order">[/code]
    [code]<label for="tx-indexedsearch-selectbox-order"><f:translate key="form.orderBy" />:</label>[/code]
    [code]<f:form.select name="search[sortOrder]" options="{allSortOrders}" value="{searchParams.sortOrder}" id="tx-indexedsearch-selectbox-order" class="tx-indexedsearch-selectbox-order" />&nbsp;[/code]
    [code]<f:form.select name="search[sortDesc]" options="{allSortDescendings}" value="{searchParams.sortDesc}" id="tx-indexedsearch-selectbox-desc" class="tx-indexedsearch-selectbox-desc" />[/code]
    [code]</div>[/code]
    [code]</f:if>[/code]
    [code]<f:if condition="{allNumberOfResults}">[/code]
    [code]<div class="tx-indexedsearch-search-select-results">[/code]
    [code]<label for="tx-indexedsearch-selectbox-results"><f:translate key="form.atATime" /></label>[/code]
    [code]<f:form.select name="search[numberOfResults]" options="{allNumberOfResults}" value="{searchParams.numberOfResults}" id="tx-indexedsearch-selectbox-results" class="tx-indexedsearch-selectbox-results" />[/code]
    [code]</div>[/code]
    [code]</f:if>[/code]
    [code][/code]
    [code]</f:if>[/code]
    [code]<div class="tx-indexedsearch-search-submit">[/code]
    [code]<f:form.submit name="search[submitButton]" value="{f:translate(key: 'form.submit')}" id="tx-indexedsearch-searchbox-button-submit" class="tx-indexedsearch-searchbox-button" />[/code]
    [code]</div>[/code]
    [code]</fieldset>[/code]
    [code][/code]
    [code]</f:form>[/code]
    [code]</div>[/code]
    [code]</html>[/code]
    [code][/code]

    Das Partial funktioniert aber nicht und wirft folgenden Fehler aus!

    [code]Oops, an error occurred!
    Argument 1 passed to TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameByAction() must be of the type string, null given, called in C:\xampp\htdocs\example\public\typo3\sysext\extbase\Classes\Mvc\Web\Routing\UriBuilder.php on line 609[/code]


  • 1
  • Julian.Hofmann Julian.Ho...
    Flash Gordon
    0 x
    3085 Beiträge
    132 Hilfreiche Beiträge
    09. 10. 2020, 09:59

    Wo verwendest Du dieses Partial?

    Wenn Du es *außerhalb* der IndexedSearch verwendest, dann fehlt dem form-ViewHelper bei der Suche nach einem Pluginnamen oder einem Controller die Information. Wenn das Partial innerhalb eines Templates aufgerufen wird, das der Controller der IndexedSearch parst, dann ist der Context klar, und ist der Controller ermittelbar.

  • Stefan80 Stefan80
    T3PO
    0 x
    13 Beiträge
    1 Hilfreiche Beiträge
    12. 10. 2020, 09:37

    Vielen Dank für die Antwort!
    Ich benutze es außerhalb, direkt in meinem FluidTemplate. Ich habe die Informationen ergänzt:

    [code]<f:form action="search" method="post" id="tx_indexedsearch" pageUid="{settings.targetPid}" extensionName="IndexedSearch" pluginName="Pi2" targetPid="12">[/code]

    Es scheint aber auch so nicht zu funktionieren. Typo3 wirft einen Fehler aus, ohne nähere Informationen!

    Oops, an error occurred! Code: 20201012093434d664c0d4

  • Julian.Hofmann Julian.Ho...
    Flash Gordon
    0 x
    3085 Beiträge
    132 Hilfreiche Beiträge
    12. 10. 2020, 10:42

    Mit einem "config.contentObjectExceptionHandler = 0" im TypoScript wird TYPO3 etwas gesprächiger bei den "Oops"-Meldungen.
    Aber nicht vergessen, diese Zeile in Production wieder rauszunehmen. Die ausführlicheren Fehlerinformationen sollten nur für Debugging sichtbar sein.

  • Stefan80 Stefan80
    T3PO
    1 x
    13 Beiträge
    1 Hilfreiche Beiträge
    12. 10. 2020, 12:53

    Für alle die die indexed search über Fluid einbinden wollen:

    <f:form action="search" method="post" controller="Search" id="tx_indexedsearch" pageUid="12" extensionName="IndexedSearch" pluginName="Pi2" >

    wobei pageUid die Id der Seite ist, in der das Search Plugin eingebunden ist

  • 1