Skip to content
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

Closed
deMD opened this issue Jul 22, 2019 · 12 comments
Closed

uSync reports shows Angular template #35

deMD opened this issue Jul 22, 2019 · 12 comments

Comments

@deMD
Copy link

deMD commented Jul 22, 2019

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.
image
image

Umbraco 8.1.0
uSync 8.1.0

@KevinJump
Copy link
Owner

Hi

have you tried updating the ClientDependency Version in the config/clientdependency.config file ? it might be some cached javascript between upgrades.

Kevin

@deMD
Copy link
Author

deMD commented Jul 22, 2019

Not tried that yet, will do.

@deMD
Copy link
Author

deMD commented Jul 22, 2019

Changing the ClientDependency version did not change the issue sadly.

@ThomasSkyldahl
Copy link

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.

@KevinJump
Copy link
Owner

yeah, I suspected so - we do force a few places, we must have missed a few

https://github.com/KevinJump/uSync8/blob/v8/8.2/uSync8.BackOffice/Models/SyncProgressModels.cs#L9

@deMD
Copy link
Author

deMD commented Sep 18, 2019

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
                    }
                }); 

@ThomasSkyldahl
Copy link

Enums should also be decorated as some prefer them as strings by default others as integers.

@KevinJump
Copy link
Owner

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.

@KevinJump
Copy link
Owner

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.

@ThomasSkyldahl
Copy link

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.

KevinJump pushed a commit that referenced this issue Sep 18, 2019
@KevinJump KevinJump added this to the 8.2.1 - Patche Release milestone Sep 23, 2019
@KevinJump
Copy link
Owner

this will be in the next release 8.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants