# Live Shopping Slider Error

**URL:** <https://forum.shopware.com/t/live-shopping-slider-error/51478>\
**Category:** Allgemein\
**Created:** [1. März 2018 um 15:23 UTC](https://forum.shopware.com/t/live-shopping-slider-error/51478 "2018-03-01T15:23:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Misengo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/misengo/32/21446_2.png) [@Misengo](https://forum.shopware.com/u/Misengo)\
**Post date:** [1. März 2018 um 15:23 UTC](https://forum.shopware.com/t/live-shopping-slider-error/51478/1 "2018-03-01T15:23:32Z")

</div>

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

&nbsp;

```
"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 :-/ ?

---

<div class="post-metadata">

**Author:** ![Misengo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/misengo/32/21446_2.png) [@Misengo](https://forum.shopware.com/u/Misengo)\
**Post date:** [1. März 2018 um 16:05 UTC](https://forum.shopware.com/t/live-shopping-slider-error/51478/2 "2018-03-01T16:05:04Z")

</div>

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;
    }

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![Misengo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/misengo/32/21446_2.png) [@Misengo](https://forum.shopware.com/u/Misengo)\
**Post date:** [3. März 2018 um 05:52 UTC](https://forum.shopware.com/t/live-shopping-slider-error/51478/3 "2018-03-03T05:52:26Z")

</div>

Scheint ein bekanntes Problem zu sein&nbsp;[Shopware Issuetracker](https://issues.shopware.com/issues/PT-8807?projects=PT&plugin=LiveShopping&status=1,3,10001,4,10010,10025,10017)

Lösung ist hier das Plugin neu zu installieren,&nbsp;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.

&nbsp;

&nbsp;

&nbsp;
