-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uSync reports shows Angular template #35
Comments
Hi have you tried updating the ClientDependency Version in the config/clientdependency.config file ? it might be some cached javascript between upgrades. Kevin |
Not tried that yet, will do. |
Changing the ClientDependency version did not change the issue sadly. |
Hi Kevin, I stumpled upon the same issue, its caused by changes to the default JSON Serializer, seems like uSync uses the default serializer settings, it would' probably be good to use special JsonSerializerSettings when serializing and Deserializing in uSync to ensure the formatting is correct. |
yeah, I suspected so - we do force a few places, we must have missed a few |
Ah that makes sense. I always remove the existing settings and add my own settings to make sure it formats according to our wishes. For reference here are my settings: GlobalConfiguration.Configuration.Formatters.Add(new JsonMediaTypeFormatter
{
SerializerSettings = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
Formatting = Formatting.Indented
}
}); |
Enums should also be decorated as some prefer them as strings by default others as integers. |
you have to be careful doing that, as there have been places in the Umbraco Core where the setting has been missed and then that stops to. |
it's safer to do it per controller (can't remember exactly but you can mark up formatters by the controller and then you don't risk breaking other things). but yes we will fix all our classes to ensure they stay as expected for us. |
thats a good point, we already have our specialized serializer settings registered in the DI as we use them for other stuff than web requests, so its nice to be able to inject our SharedSerializerSettings. |
this will be in the next release 8.2.1 |
Describe the bug
When running uSync on Umbraco 8 when looking at the report it shows only angular templates instead of data. This happens on an Umbraco 8 website which had been upgraded from 8.0.0 to 8.1.0. Reinstalling uSync has not resolved the issue.
Umbraco 8.1.0
uSync 8.1.0
The text was updated successfully, but these errors were encountered: