php Problem

@potti schrieb:

Tante Edit sag jetzt bekomm ich die Meldung wenn ich auf ein Artikel gehe

 

],
Fatal error : Uncaught exception ‚Exception‘ with message ‚Condition Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition not supported‘ in /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php:223 Stack trace: #0 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(175): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory->getConditionHandler(Object(Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition)) #1 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(154): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory->addConditions(Object(Shopware\Bundle\SearchBundle\Criteria), Object(Shopware\Bundle\SearchBundleDBAL\QueryBuilder), Object(Shopware\Bundle\StoreFrontBundle\Struct\ProductContext)) #2 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(87): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory->cre in  /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php  on line  223
503 Service Unavailable

Ist zwar schon eine Weile her, aber der Fehler tritt unter anderem auf wenn man den ConditionHandler nicht registriert hat. Das war zumindest bei mir das Problem, hatte den register Event vergessen. Dazu einfach folgendes in deiner Bootstrap oder deinem Subscriber hinzufügen (Namen entsprechend anpassen).

$this->subscribeEvent(
    'Shopware_SearchBundleDBAL_Collect_Condition_Handlers',
    'registerConditionHandler'
);

public function registerConditionHandler()
{
    return new \DeinPlugin\Condition\ConditionHandler();
}