Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Can't upload images: Cannot read properties of undefined (reading 'canconfigureapproval')

Vote:
 

I can't upload images to the media assets panel. I tried both For All Sites and For This Page and get the same error. I'm running this solution locally, and it's a brand new deploy. There's nothing in the forums or the web for the term "canconfigureapproval". Seeing how it looks like it's related to approval sequences, I disabled all approval sequences and still get the same error.

Thinking maybe there were some residual .js files corrupting things, I deleted the entire C:\inetpub\solution folder and republished. Then thought maybe it was something in the codebase getting published so I re-cloned the entire repository. For giggles the CMS database was deleted and rebuilt, too. I also upgraded from 12.5.0 to 12.6.0 in case there was a problem with the .js file in that package, but that didn't change anything.

I'm using the admin account with full access rights. I also noticed a license isn't loaded for local development, but not sure if this is pertinent. 

Any ideas would be very helpful. We're running CMS 12.5.0 and everyone else on the team can load images just fine (even after activating approval sequences).

#284189
Edited, Jul 21, 2022 23:57
Vote:
 

Might be a silly question but have you configured .jpg as allowed media type in CMS? Also worth checking if your user has full admin right accesses.

#284205
Jul 22, 2022 9:13
Vote:
 

Thanks Manoj. Not a silly question at all. I hadn't thought of that and I went back to check. We do have that extension allowed. To be sure I wasn't trying with a file that was corrupted or anything I also just tried with a new PNG image and got the same error. Also, I'm using the admin account with full access rights. :|

This is what we have on the ImageMediaData : ImageData class:

[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png,webp")]

#284231
Edited, Jul 22, 2022 14:23
- Jul 22, 2022 15:31
This looks correct. Have you opened a ticket with Optimizely on this?
Vote:
 

When uploading images, the model in EditApprovalDefinition.js was coming up with a 404 error, and appSettings.Development.json has a line:

"FileBlobProvider": {
  "Path""C:\\inetpub\\wwwroot\\sitename\\App_Data\\blobs"
},

I checked and Visual Studio publish never created that folder, which is why I was getting the error and others weren't. They had the folder, so their Opti solution had some place to store the images.

After confirming this with someone, creating the folder and giving IIS_IUSRS modify permissions, now media is being successfully uploaded.

#284387
Edited, Jul 25, 2022 20:24
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.