# Widgets don't work anymore in infinete scroll after upgrade to Shopware 5.7.2

**URL:** <https://forum.shopware.com/t/widgets-dont-work-anymore-in-infinete-scroll-after-upgrade-to-shopware-5-7-2/89967>\
**Category:** Shopware 5\
**Tags:** general\
**Created:** [26. August 2021 um 04:19 UTC](https://forum.shopware.com/t/widgets-dont-work-anymore-in-infinete-scroll-after-upgrade-to-shopware-5-7-2/89967 "2021-08-26T04:19:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroen\_treshold\_nl](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jeroen\_treshold\_nl](https://forum.shopware.com/u/jeroen_treshold_nl)\
**Post date:** [26. August 2021 um 04:19 UTC](https://forum.shopware.com/t/widgets-dont-work-anymore-in-infinete-scroll-after-upgrade-to-shopware-5-7-2/89967/1 "2021-08-26T04:19:10Z")

</div>

For our customer we upgraded Shopware to version 5.7.2.

After the upgrade to the latest version infinite scroll is not working anymore when we have a own widget in our template. All widgets we have created are not working anymore when using infinite scroll.

The first page is loaded perfect but when we scroll down, the system hangs on the js error:  
Uncaught TypeError: Cannot read property ‚trim‘ of undefined.

> 1629951430\_3be3945772966d351e47896c86d3ae64.js:665 Uncaught TypeError: Cannot read property ‚trim‘ of undefined  
> at Plugin.appendListing (1629951430\_3be3945772966d351e47896c86d3ae64.js:665)  
> at Plugin.i (1629951430\_3be3945772966d351e47896c86d3ae64.js:5)  
> at Object.success (1629951430\_3be3945772966d351e47896c86d3ae64.js:573)  
> at c (1629951430\_3be3945772966d351e47896c86d3ae64.js:5)  
> at Object.fireWith [as resolveWith] (1629951430\_3be3945772966d351e47896c86d3ae64.js:5)  
> at l (1629951430\_3be3945772966d351e47896c86d3ae64.js:5)  
> at XMLHttpRequest. (1629951430\_3be3945772966d351e47896c86d3ae64.js:5)

I removed all custum build pug-ins and switched to the responsive theme but the issue still ocures.  
Any idea what can couse this problem. When wesSwitch off infinite scroll everything is working again.

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [26. August 2021 um 07:09 UTC](https://forum.shopware.com/t/widgets-dont-work-anymore-in-infinete-scroll-after-upgrade-to-shopware-5-7-2/89967/2 "2021-08-26T07:09:43Z")

</div>

Hello,

I cannot reproduce this on the current development branch of Shopware 5.7.  
Did you cleared the cache and compile the theme anew after uninstalling all the plugins?

Best regards from Schöppingen  
Michael Telgmann

---

<div class="post-metadata">

**Author:** ![jeroen\_treshold\_nl](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jeroen\_treshold\_nl](https://forum.shopware.com/u/jeroen_treshold_nl)\
**Post date:** [26. August 2021 um 09:59 UTC](https://forum.shopware.com/t/widgets-dont-work-anymore-in-infinete-scroll-after-upgrade-to-shopware-5-7-2/89967/3 "2021-08-26T09:59:42Z")

</div>

Hi Michael,

Yes I did.

What I just did is:

- I created a new environment with Shopware 5.7.2 with the demo data.
- I created a small plugin with a widget
- Installed the plugin
- I duplicated products to have enough for infinite scrolling
- Added the widget in Resonsive theme in themes/Frontend/Bare/frontend/listing/product-box/box-basic.tpl
- Tested this

What happens? The page loads only the first products (page) and the ajax call runs for ever when you scroll down.

You can test the behaviour at:

> **[Test](http://testsw5.treshold.nl/test/)**

You can download the plug-in with the following url:  
[http://testsw5.treshold.nl/Testwidgets.zip](http://testsw5.treshold.nl/Testwidgets.zip)

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [26. August 2021 um 14:44 UTC](https://forum.shopware.com/t/widgets-dont-work-anymore-in-infinete-scroll-after-upgrade-to-shopware-5-7-2/89967/4 "2021-08-26T14:44:07Z")

</div>

Hello Jeroen,

with the help of your plugin, I was able to reproduce the error. I created a ticket for that, as your plugin is working fine with Shopware 5.6. [Shopware Issuetracker](https://issues.shopware.com/issues/SW-26252)

Best regards from Schöppingen  
Michael Telgmann
