BUG: "Export as" only shows as undefined

Vote:
 

I just saw (on two DXP sites running EpiServer.Forms 5.6.0) that when I try to export form submissions all the options are "undefined". 

It's the same problem if I chose another language in Language Settings.

#308012
Sep 05, 2023 13:49
Vote:
 

This is still a problem in 5.7.0

This occur if you have something like this in Startup.cs

.AddJsonOptions(options =>
 {
 options.JsonSerializerOptions.PropertyNamingPolicy = null;
 options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
 });
#311165
Oct 20, 2023 13:23
Vote:
 

We had similar issue when adding a JsonSerializer in start up. We removed it from startup and created a custom json result class that was used instead of JsonResult type wherever we were using Json data. I am not sure if Opti is expecting any specific serializer type or is it a bug.

#312267
Nov 09, 2023 18:51
Vote:
 

I had to do the same as well. Then I had to add  "new JsonSerializerOptions() { PropertyNamingPolicy = null }" to every JsonResult like so:

return Json(new
{
    Result = result
}, new JsonSerializerOptions() { PropertyNamingPolicy = null });
#312303
Nov 10, 2023 7:24
Dileep D - Nov 10, 2023 15:34
Yet to find out the root cause of the issue (may be for another day ) but glad it worked out.
Vote:
 

We also stumbled upon the same issue and it is a bit anoying that we can break core functionality in optimizely forms when adding a NamingPolicy. This happens often when you upgrade a solution with for instace some APIs relying on a format that was in the old .net framework

We added this in startup.cs for fixing this issues since we had many scripts relying on our apis beeing consistent. After we added this to startup.cs Forms stopped working instead. We have tried to get Optimizely to fix but I guess Forms is not that important :) 

Anyhow we also created a custom json result instead and removed this form startup.cs but since this is a bit cumbursome it would be better if Optimizely them self added a custom json result to their product making sure we do not break the core-functionallity within the CMS when adding things like this to startup.cs. 

Since we can not now forsure how they handle their api:s it would be better if they made sure their products works isoleted from settings we can make in startup.cs specielly when it comes to json results.

#312814
Nov 20, 2023 8:23
* 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.