Type error 'Cannot read property 'forEach' of undefined'

In order to create a dynamic slideshow on Editor x i followed these steps:

  1. I added a progallery and named it dynamic Slideshow .
  2. Added a text1 and named it slideTitle0 .
  3. Added a text2 and named it slideDescription0 .
  4. I created a database named ‘DynamicSlides’ with 3 fields ‘Title’(text),‘SlideBackground’(image) and ‘description’(text)
    I added the following code in dev mode as the attached file (taken and modified from wix examples):
    I got back type error ‘Cannot read property ‘forEach’ of undefined’ can someone help me to solve this? Many thanks!

Hi,

  1. Next time please put the code in the post body and not as attachment.

  2. It looks like you didn’t have any slide, maybe misspelled the slideshow id, maybe something else. It’s hard to say.

  3. I suggest you add console.log($w(“#dynamicSlideshow”).slides); and see what is logs to the console.