Skip to content

[BUG] Relevance component fails on evaluating TypoScript inside condition #4351

@straschek-io

Description

@straschek-io

Describe the bug
Given a TypoScript configuration scoped within TypoScript conditions, the RelevanceComponent does not consider the desired configuration.

The QueryBuilder is injected in RelevanceComponent and then uses Util::getSolrConfiguration() to gather the configuration values.

This leads to ConfigurationManager L102 (as there is no $contextPageId) and then to usage off full plain TypoScript via ConfigurationManager L72

Instead of this (IMO) the TypoScript given within the (AfterSearchQueryHasBeenPreparedEvent) should be used.

To Reproduce
Steps to reproduce the behavior:
Set a boostFonction or boostQuery within a page condition:

[page["uid"] == 22]
    plugin.tx_solr {
        search {
            query {
                boostFunction = myboostField_intS^2
...

Set an xdebug breakpoint in QueryBuilder->useBoostFunctionFromTypoScript() and analyze the boostFunction content of $searchConfiguration.

Expected behavior
I expect the configuration for boosting to be the same as within the SearchRequest

Used versions

  • TYPO3 Version: 13.4.9
  • EXT:solr Version: 13.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions