Repeater doesn't read URL link

[Intro]
I have a simple repeater on my website like the image below (image.1), linking item from datacollections using wixcode script (code is below).

[Script]
$w(‘#repeater1’).onItemReady(($w, itemData) => {
//add here all the relevant elements of the repeater
$w(‘#image’).src = itemData.icon;
$w(‘#title’).text = itemData.title;
$w(‘#description’).text = itemData.description;
$w(‘#download’).link = itemData.link1; // HERE IS NOT WORKING
$w(‘#purchase’).link = itemData.link2; // has same error message but somehow works!
});

[Issue]

  1. Repeater cannot read url in the datacollection.
  2. I did turn off the link from the editor view so I know I am linking the data through script (image.2)

[Error message in console]
Wix code SDK Warning: The link parameter of “download” that is passed to the link method cannot be set to null or undefined.
(image.3)

Please anyone help me solve this issue! :slight_smile:
Thank you in advance.


image.1 : Repeater

image.2 : Same page in editor

image.3 : Error massage

Hi Caud ,

Seems like you are getting the link from undefined column in the dataset, which is Link1 !
if you took another look at the dataset, you can see that Link1 is not exist, it should be link :wink:

Good Luck!

Mustafa

IT WORKED!!!
and it was such a small mistake to spot!
Thank you very much to help me Mustafa!!

Caud