Hello,
My organization and I keep running into the attatched error ("cannot set properties of undefined setting 'referedlds') when trying to select an image source in an EB. Does anyone know a solution?
This looks quite odd. Do you have any specific steps to reproduce this issue, or any sample data/app?
I am having an identical issue. It seems to have begun when I duplicated an entire page and sought to edit the images within the duplicated page. Now this error is occurring when I am attempting to edit any of the images across all of the pages in my experience builder app. Any help troubleshooting this would be much appreciated!!!
I recently ran into this same error (Cannot set properties of undefined (setting 'referedIds')) when setting the source for any image widget or button image. Turned out to be a corrupt image widget. After you find the corrupt image widget, delete it.
If you have a few amount of recently added images, you could go through each one in EXB, delete it, test if you can set the source for another image widget. If you can, then you found the culprit. If not, hit undo and try the next image.
In our case, we had too many images and pages, therefore the following steps were done to figure out the culprit image:
1. Inspect F12 Developer Tools Console and find the culprit Image key:
F12 developer tools Console error pointed me towards https://myportal/portal/apps/experiencebuilder/jimu-for-builder/index.js
Object.keys(o).forEach((e=>{
o[e].referedIds = [];
const t = o[e].originId;
t !== e && (i[t] ? i[t].referedIds.push(e) : (i[t] = Object.assign({}, o[t]),
i[t].referedIds = [e]))
}
I set a breakpoint at line 1 and inspected the 'o' object, which is JSON object containing a bunch of images. The first key (4512369854) in my object had a value of undefined:
o = {4512369854: undefined, 8759631578: {originalName:..}
Therefore, the code was trying to access the referedIds property of an undefined object.
2. Okay, next step is how to relate this key (4512369854) to the culprit image in EXB.
I used some python in Pro to grab the EXB app JSON:
app_itemid = '<enter your EXB item id here>'
app_item = gis.content.get(app_itemid)
app_data = app_item.get_data()
app_data
Hope you're still with me. I then copied the app_data (app JSON) over to Notepad and searched for the key (4512369854), which was tied to widget_3728, which had a label of Image 593. You will have a different widget and label than mine. Now that you know it is Image 593 causing problems, go over to EXB.
3. In EXB
Click on each page in your EXB and search for Image 593. Once you find it, delete it. You can then re-create it.