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

Unable to export content #162

Closed
warrentheranga opened this issue Oct 1, 2020 · 11 comments
Closed

Unable to export content #162

warrentheranga opened this issue Oct 1, 2020 · 11 comments
Assignees
Labels
bug Something isn't working release/8.7.1

Comments

@warrentheranga
Copy link

I'm not able to export content out with uSync Content Edition v8.7.0.1
I tried under Umbraco 8.6.4 and now 8.7 with uSync 8.7.0.1

Steps to reproduce the behavior:

  1. From the uSync dashboard I clicked Export
  2. Proceeds successfully through all elements up until Content
  3. Fails with error: Exporting: Unexpected character encountered while parsing value: i. Path '', line 1, position 1.

Screenshot:
Screen Shot 2020-10-01 at 10 29 20 am

Desktop information:

  • Umbraco Version: 8.7.0
  • uSync Version: 8.7.0.1
  • OS: Windows 10 Pro 2004
  • Browser: Chrome, Edge, Firefox

Full log exception error:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: i. Path '', line 1, position 1.
at Newtonsoft.Json.JsonTextReader.ParseValue() in //Src/Newtonsoft.Json/JsonTextReader.cs:line 1706
at Newtonsoft.Json.JsonTextReader.Read() in /
/Src/Newtonsoft.Json/JsonTextReader.cs:line 419
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) in //Src/Newtonsoft.Json/Linq/JContainer.cs:line 729
at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings) in /
/Src/Newtonsoft.Json/Linq/JArray.cs:line 138
at Newtonsoft.Json.Linq.JToken.ReadFrom(JsonReader reader, JsonLoadSettings settings) in //Src/Newtonsoft.Json/Linq/JToken.cs:line 2133
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings) in /
/Src/Newtonsoft.Json/Linq/JToken.cs:line 2183
at uSync8.ContentEdition.Mapping.SyncNestedValueMapperBase.GetExportProperties(JObject item, IContentType docType)
at uSync8.ContentEdition.Mapping.Mappers.NestedContentMapper.GetExportValue(Object value, String editorAlias)
at uSync8.ContentEdition.Mapping.SyncValueMapperCollection.GetExportValue(Object value, String editorAlias)
at uSync8.ContentEdition.Serializers.ContentSerializerBase1.GetExportValue(Object value, PropertyType propertyType, String culture, String segment) at uSync8.ContentEdition.Serializers.ContentSerializerBase1.SerializeProperties(TObject item, SyncSerializerOptions options)
at uSync8.ContentEdition.Serializers.ContentSerializer.SerializeCore(IContent item, SyncSerializerOptions options)
at uSync8.Core.Serialization.SyncSerializerRoot1.Serialize(TObject item, SyncSerializerOptions options) at uSync8.BackOffice.SyncHandlers.SyncHandlerRoot2.SerializeItem(TObject item, SyncSerializerOptions options)
at uSync8.BackOffice.SyncHandlers.SyncHandlerRoot2.Export(TObject item, String folder, HandlerSettings config) at uSync8.BackOffice.SyncHandlers.SyncHandlerRoot2.ExportAll(TContainer parent, String folder, HandlerSettings config, SyncUpdateCallback callback)
at uSync8.BackOffice.SyncHandlers.SyncHandlerRoot2.ExportAll(String folder, HandlerSettings config, SyncUpdateCallback callback) at uSync8.BackOffice.uSyncService.Export(String folder, IEnumerable1 handlers, uSyncCallbacks callbacks)
at uSync8.BackOffice.uSyncService.Export(String folder, SyncHandlerOptions handlerOptions, uSyncCallbacks callbacks)
at uSync8.BackOffice.Controllers.uSyncDashboardApiController.Export(uSyncOptions options)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.b__2(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__15.MoveNext()

@warrentheranga
Copy link
Author

warrentheranga commented Oct 1, 2020

Hmm.... looks like I can also replicate it (the error) adding content into a text area
we added dummy text: [iframe]
into an area and attempting to Save and Publish causes this same behaviour

@KevinJump
Copy link
Owner

Hi it looks like its in a nested content element ?

I am guessing (because we just fixed something similar for Translation Manager) that it is wrongly identifing the text string as JSON (the [] will do that).

We use the inbuilt DetectIsJson method of umbraco for this, but in somecases its not good enough, so we need to transition to something that actually attempts to then load the JSON 😞

we can take a look at this, its not a big deal, its just used in quite a few places. will try and get it into the next release.

@KevinJump KevinJump self-assigned this Oct 1, 2020
@KevinJump KevinJump added release/8.7.1 bug Something isn't working labels Oct 1, 2020
@KevinJump
Copy link
Owner

turns out its not used as widely (yeah inheritance) - there are a few other places we use DetectIsJson but there its usally more controlled (like in an image/image-cropper situation. so this fix should catch the instances where it happens for content.

@creativesuspects
Copy link

@KevinJump Do you have any idea when you’ll be releasing 8.7.1?

@KevinJump
Copy link
Owner

Hi, just in the process of checking a few things probably today or tomorrow (6th Oct)

@creativesuspects
Copy link

Hi, just in the process of checking a few things probably today or tomorrow (6th Oct)

Awesome! Much appreciated.

@KevinJump
Copy link
Owner

today :) - https://www.nuget.org/packages/uSync

@creativesuspects
Copy link

creativesuspects commented Oct 6, 2020

I have upgrade to uSync 8.7.1, but unfortunately I'm still getting an error on this entry:

image

Invalid property identifier character: {. Path '', line 1, position 1.

Edit: Never mind, I forgot to also update the uSync.ContentEdition package. It now works like a charm!

@KevinJump
Copy link
Owner

:( is that a text box in nested content ?

I've just tested it locally - i don't get any error 😕 can you just check that uSync8.core.dll, uSync8.backoffice.dll and uSync8.contentEdition.dll are running v8.7.1

@KevinJump KevinJump reopened this Oct 6, 2020
@creativesuspects
Copy link

creativesuspects commented Oct 6, 2020

I guess you didn’t read my edit. :-) I did forget to update the uSync.ContentEdition package. Your fix works like a charm! 👍

@KevinJump
Copy link
Owner

yeah, i don't read very well. glad it worked 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release/8.7.1
Projects
None yet
Development

No branches or pull requests

3 participants