Widget Media Selector Fails in Production with "Cannot read properties of undefined ('mediaFilesSele

Chandni Negi asked on September 26, 2025 10:05

Hello,

I am encountering a critical issue with the Widget Properties dialog in my Kentico 13 production environment. This is specifically affecting the Media Selector component used within widget configurations.

The issue is strictly environment-specific; it works flawlessly in our Development and Staging environments.

The error in the console is :- VM703:9 Uncaught TypeError: Cannot read properties of undefined (reading 'mediaFilesSelector') at < anonymous >:9:37 at < anonymous >:11:3 at kentico-abtest-varia…4.entry.js:1:347529 at NodeList.forEach (< anonymous >) at L (kentico-abtest-varia…4.entry.js:1:347274) at Ka.renderNewMarkup (kentico-abtest-varia….entry.js:1:1046699) at Ka.formMarkupChanged (kentico-abtest-varia….entry.js:1:1047426) at index-487129cb.js:1:8038 at Array.map (< anonymous >) at index-487129cb.js:1:8021

and 

this.getString is not a function
at yf.render (kentico-abtest-variant-listing_44.entry.js:1:1169537)
at F (index-487129cb.js:1:6289)
at D (index-487129cb.js:1:6125)
at index-487129cb.js:1:5508
at _ (index-487129cb.js:1:7497)
at A (index-487129cb.js:1:5499)
at Array.< anonymous > (index-487129cb.js:1:5359)
at me (index-487129cb.js:2:543)
at pe (index-487129cb.js:2:605) < kentico-single-file-selector class= "hydrated" > < /kentico-single-file-selector > 

Recent Answers


Juraj Ondrus answered on September 26, 2025 10:28

What is different in the not working environment? The media dialog makes some requests - isn't it possible that these requests to load the media files are blocked by some custom CSP policy, CORS headers, firewall, gateway, proxy or anything else which might be applied on that environment and not on another ones?

0 votesVote for this answer Mark as a Correct answer

Chandni Negi answered on September 26, 2025 12:36

I would like to highlight an environment-specific issue. Currently, we have two different servers: Production and Staging. For testing purposes, I created a new site named Authoring on the Staging server and copied all the Production code there. On the Authoring site, everything works fine — including the Media Selector, which functions correctly even with the same Production code. However, on the Production server, the Media Selector is failing, despite having the exact same codebase. The only difference between the two environments is the server setup, which suggests the issue may be configuration-related on Production.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.