Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Im using the youtube picker for channel on 7.15.3 and it used to work, but now it's only returning the first video of all the picked videos. this is my code:
YouTube videos = null;
videos = Model.GetPropertyValue<YouTube>("agentJoinVideos");
In the picker I have 3 videos selected, getting the count of this object is just 1 the first one. Is there an update I missed or how do I get it back? if I switch the order of the videos the video will change but it's still only the first.
Shouldn't you get a list of videos? So something like this:
List<YouTube> videos = new List<YouTube>();
So this code worked before, its legacy code I'm trying to get working again.
I tried your solution but I got an error that said:
'YouTube' does not contain a definition for 'AddRange' and no accessible extension method 'AddRange' accepting a first argument of type 'YouTube' could be found
So, back to square one.
Well the error that is given implies that you are using the extension on something that isn't a list. Did you also copy the List part over?
So I went back and got the list working and accessed the list but now, although it builds, it's not displaying any videos even the main one. I'm wondering if the update we did from 7.5.3 to 7.15.3 is the likely culprit. I'm thinking there must have been a change in the way this datatype is passed perhaps because this code worked for years and now it just doesn't.
When you did the update for Umbraco, did you also update the package? Try debugging it so see if the list is empty.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted