Live Shopping Slider Error

Auf der Startseite kommt dieser Error, wir haben dort aktuell gar keinen LiveShopping Slider

 

"Fatal error: Uncaught Assert\InvalidArgumentException: The limit must be greater than equals 1 in /var/www/shopware/vendor/beberlei/assert/lib/Assert/Assertion.php:212 Stack trace: #0 /var/www/shopware/vendor/beberlei/assert/lib/Assert/Assertion.php(1066): Assert\Assertion::createException(0, 'The limit must ...', 35, NULL, Array) #1 /var/www/shopware/engine/Shopware/Bundle/SearchBundle/Criteria.php(115): Assert\Assertion::min(0, 1, 'The limit must ...') #2 /var/www/shopware/custom/plugins/SwagLiveShopping/Bundle/EmotionBundle/ComponentHandler/LiveShoppingSliderHandler.php(115): Shopware\Bundle\SearchBundle\Criteria->limit(0) #3 /var/www/shopware/custom/plugins/SwagLiveShopping/Bundle/EmotionBundle/ComponentHandler/LiveShoppingSliderHandler.php(75): SwagLiveShopping\Bundle\EmotionBundle\ComponentHandler\LiveShoppingSliderHandler->createCriteria(Object(Shopware\Bundle\StoreFrontBundle\Struct\ShopContext), 0) #4 /var/www/shopware/engine/Shopware/Bundle/EmotionBundle/Service/EmotionElementService.php(125): SwagLiveShopping\B in /var/www/shopware/vendor/beberlei/assert/lib/Assert/Assertion.php on line 212"

Ein Wert scheint 0, 1 zu sein - aber welcher :-/ ?

Habe mir mal $limit ausgeben lassen - ist auf der EKW 0.

/**
     * @param ShopContextInterface $context
     * @param int $limit
     *
     * @return Criteria
     */
    private function createCriteria(ShopContextInterface $context, $limit)
    {

        echo "";
        print_r($limit);
        exit();        

        $criteria = $this->criteriaFactory->createBaseCriteria(
            [$context->getShop()->getCategory()->getId()],
            $context
        );

        $criteria->addBaseCondition(new LiveShoppingCondition());
        $criteria->limit($limit);

        return $criteria;
    }

 

Scheint ein bekanntes Problem zu sein Shopware Issuetracker

Lösung ist hier das Plugin neu zu installieren, das EKW Element mit Liveshopping zu öffnen und das Element neu abzuspeichern.

Der Wert number_prodcuts ist in dem Fall nicht verfügbar und beim get darauf bleibt dieser leer. Dadurch läuft die Criterie in eine greater then 1 exception. Hoffe es hilf noch wem.