Coder Social home page Coder Social logo

kevinjump / usync Goto Github PK

View Code? Open in Web Editor NEW
106.0 6.0 62.0 84.48 MB

Database syncing tool for Umbraco CMS

Home Page: https://jumoo.co.uk/usync/

License: Mozilla Public License 2.0

C# 82.18% JavaScript 5.24% HTML 4.17% CSS 0.91% Smalltalk 0.05% TypeScript 7.46%
umbraco umbraco-v8 usync umbraco-v9 umbraco-v10 hacktoberfest umbraco-v11 umbraco-v12 umbraco-v13 umbraco-v14

usync's Introduction

uSync - for UniCore

(Umbraco on NetCore aka Umbraco 9 and beyond)

Database syncing tool for Umbraco

uSync

What is uSync

uSync is a Umbraco package that reads and writes your Umbraco settings to and from disk. This allows you to source control and deploy changes you make inside Umbraco.

https://jumoo.co.uk/uSync/

usync's People

Contributors

andyboot avatar arulprabakaran avatar bielu avatar busrasengul avatar calvindavis avatar dependabot[bot] avatar erikjanwestendorp avatar henryjump avatar jacksorjacksor avatar jannikanker avatar jcrepin avatar johanplate avatar josemarcenaro avatar kcharecki avatar kevinjump avatar lauraneto avatar leekelleher avatar maikelveen avatar mayhammf avatar mikecp avatar mistyn8 avatar nikrimington avatar nul800sebastiaan avatar owainj avatar paulwoodland avatar rockerby avatar sgerme avatar uniquelau avatar vsilvar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

usync's Issues

Improved property checking

Reporting new values in content doesn't always show them when the properties are also new.

4467344 Improves the identifcation of content properties where properties are in the target but not in the current (so new values)

Can't import data types - NullReferenceException

Hi Kevin. I'm encountering the following with uSync8 and Umbraco 8.

Import of new data types fails with NullReferenceException; please see stack trace below. Report view shows 0 changes listed for these problematic types. If I create a data type with the same name, so the sync becomes an update, the import works fine. Issue is specific to data types.

Umbraco 8.0.0-alpha.58.2266
USync8 8.0.0-alpha61

image
image

2019-02-20 17:32:01,698 [P23312/D3/T71] INFO uSync8.BackOffice.uSync8BackOffice - Running Import: DataTypes
2019-02-20 17:32:01,730 [P23312/D3/T71] ERROR uSync8.BackOffice.Controllers.uSyncDashboardApiController - Unhandled controller exception occurred for request 'https://taxcycle.local/umbraco/backoffice/uSync/uSyncDashboardApi/import'
System.NullReferenceException: Object reference not set to an instance of an object.
at uSync8.BackOffice.uSyncService.Import(String folder, Boolean force, SyncEventCallback callback)
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.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
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.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()

Templates missing their master

Describe the bug
Templates are not imported under the correct master. Using Beta 4.

To Reproduce
Steps to reproduce the behavior:

  1. Create a master page template named "master"
  2. Create a template under the master named "homepage"
  3. Create another nested template under master and name it "Page 2"
  4. Run export in uSync
  5. Clear out the database and re-install the site and run the import

Expected behavior
The 2 nested templates should be displayed as child templates under master in the tree in the backoffice. But the homepage template is created at the root level and only the "Page 2" template gets created under master.

Additional context
The import seems to run in alphabetic order so when "homepage" is created "master" does not yet exist so the import creates it as a root template. The solution would be to import the items per level as the usync config file for the nested templates does correctly indicate they are level 2 and have master as their parent.

Action: Move

Could we have an action type for "Move", just like there is for "Delete"?
Sometimes I want to tidy up the data types by moving related items into a folder, and it would be nice if that was reflected in uSync too.

Right now I can move the data type, do an export, move the files to a clone, and do an import, but then it will not actually move the datatype.

Issue: settings can be overwritten when using flat file structure

using the flat file structure, means all the settings files for each type are stored in a single folder, this reduces the risk of long file name issues.

if this setting is also used without guid file names, then its possible that you can have a clash, if for example you have two about-us pages, their file names would be about-us.config and the last write would win.

f59a3c3 fixes this.

Architecture : using compositions and resolvers?

at its heart uSync has a collection of Serializers, that are responsible for getting bits of Umbraco in and out of XML. In the current version these are loaded by a singleton at start up and then accessed when needed.

Looking at Umbraco 8 and the best way to do this I think using Compositions and A Collectionbuilder is the way to go - so then we can build a collection like so:

// register *all* serializers, except those marked [HideFromTypeFinder]
composition.WithCollectionBuilder<USyncSerializerCollectionBuilder>()
     .Add(() => composition.TypeLoader.GetTypes<IUSyncSerializer>());

Then in theory when we need to we can go off and get the serializer we require - and this is where it gets funky.

each serializer will serialize a type of umbraco object (e.g IContentType) and so the return type of the functions in the Interface will change based on the type.

Ideally we want to do this with generics - so each serializer would impliment the Serializer class based on their type.

    public interface ISyncSerializer<TObject>
        where TObject : IEntity
    {
        SyncAttempt<XElement> Serialize(TObject item);
        SyncAttempt<TObject> Deserialize(XElement node, bool force);

        bool IsCurrent(XElement node);
    }

So for example...

   [USyncSerializer("B3F7F247-6077-406D-8480-DB1004C8211C", "ContentTypeSerializer")]
    public class ContentTypeSerializer : USyncSerializerBase<IContentType>, ISyncSerializer<IContentType>
    {
        public Type UmbracoObjectType => typeof(IContentType);

        public override SyncAttempt<XElement> Serialize(IContentType item)
        {
            throw new NotImplementedException();
        }

        public override SyncAttempt<IContentType> Deserialize(XElement node, bool force)
        {
            throw new NotImplementedException();
        }

        public override bool IsCurrent(XElement node)
        {
            throw new NotImplementedException();
        }
    }

Except ...

there are few issues i haven't resolved yet ...

  • We can't use composition.TypeLoader.GetTypes to load a generic interface ??
  • Even if we do load them our Collection Builder is of LazyCollectionBuilderBase I am not sure we can load a generic type their either.
  • We could have a non generic Interface but then it becomes a pain when we pass the object about (is this a big performance hit ? as we will be converting all over the code?)
  • We could load based on the Attribute ? TypeLoader.GetAttributedTypes but insider our collectionBuilder ? what do we say the type is because that needs a non-generic type?

At the moment - this is all that is in this repo - see : https://github.com/KevinJump/uSync8/tree/master/uSync8.Core/Serialization for details so far

Content type compositions are not imported

Describe the bug
A content type composed of multiple aggregations is imported without its components.

To Reproduce
Steps to reproduce the behavior:

  1. Create base document types for navigation, SEO, etc..
  2. Create a new document type that is composed of the base document types. Example: home page type.
  3. Notice that usync exported files contains the the right composition structure.
  4. Import all on another machine and notice that the base document types have been created, the Home page type document type has been created but its composition is empty.

Expected behavior
The import would correctly assign the composition to the Home page document type.

(Possible) NuCache Error after uSync Import

As described here :
https://our.umbraco.com/forum/umbraco-8/99105-nucache-500-error-after-deploy

after a uSync import/deploy you might see:

System.IndexOutOfRangeException: Index points outside the properties array, which means the properties array is corrupt.

At this time, we are not sure if this is a uSync or Umbraco issue, this is a placeholder for our investigations.

Note: the post says 8.1.1 but it might be a pre 8.1.x release issue
we are unsure if this is related to issue #18

  • This occurs with only settings (no content/media) imports

Cannot import template on umbraco 8

Hi,

I am trying to import the template using uSync on umbraco 8 and I only get error message "Failed to create template" in the dashboard as follow. Is there any advance on it?

Thanks & Regards
Alan

import_error_umbraco

Updating uSync doesn't seem to update the version number shown in the uSync section

Describe the bug
uSync was originally installed as version 8.1.0 in Umbraco 8.1
Over time things have been updated to Umbraco 8.1.2 and uSync 8.1.1
However in the uSync section in the back office, uSync still says that version 8.1.0 is installed. Checking DLL's etc 8.1.1 is definitely the version installed.

Expected behavior
I'd expect uSync to tell you that version 8.1.1 is installed not version 8.1.0

Screenshots
image

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]: Chrome
  • Version [e.g. 22] : Latest

Applies to local version of site, as well as 3 environments on Azure.

Feature: Bulk Events

Add Events for bulk actions (e.g starting/completing an import) so people can trigger on them, and do things they may want to before and after the import

Events:

  • ImportStarting
  • ImportComplete
  • ReportStarting
  • ReportComplete
  • ExportStarting
  • ExportComplete

An import of lots of datatypes can restart site and abort import

When you do a full import of datatypes (especially with Models builder in PureLive Mode) - the import might hang:

Running in debug we get this error :

System.Runtime.Serialization.SerializationException
HResult=0x8013150C
Message=Type is not resolved for member 'Umbraco.Core.Security.UmbracoBackOfficeIdentity,Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source=
StackTrace:

This appears to be coming from the internal serialization within Umbraco when the cache event is triggered.

we have a debug option to use batch saving, that is don't save the datatypes individually but in one block when at the end, using dataTypeService.Save(items) - but this also causes the error.

turning models builder off live mode, makes this largely go away - but that just might be because it reduces the number of cache rebuilds in Umbraco.

the datatype serializer updates the datatypes here
https://github.com/KevinJump/uSync8/blob/master/uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs#L34

the save happens in the parent class or in the handler if we are doing a 'batch' save.
So all saves go through these two save functions here :
https://github.com/KevinJump/uSync8/blob/master/uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs#L181

the issue was already happening when using hte direct save in DeserializeCore that is now commented out

Improve trash handling

uSync's handling of trashed content and media isn't 100%

items will move in and out of the trashed content folder, when synced, but not all the right methods are being called so we could potentially be missing internal umbraco events

Fix: a6028aa addresses this

Media from Umbraco 7.5.4 not compatible with uSync 8.0.0

I'm migrating from Umbraco 7.5.4 to 8.0.2. And is using uSync for the media and content. At first I was simply doing it wrong, placing media at incorrect locations etc. But I now believe/hope I am no longer the problem :)

I have already downloaded the source for uSync 8, included the projects as project references instead of the ones from the NuGet package and stepped my way through the content import process.

The import fails in ContentSerializerBase.cs when calling IsValid(XElement node). The node needs a key, alias and info element, and my nodes have neither. My config files look like this:

<?xml version="1.0" encoding="utf-8"?> <Image guid="6e7b4a60-1018-445a-84ae-e09d1a530732" id="5829" nodeName="an-logo_footer.png" isDoc="" updated="2018-12-07T14:32:55.9130000Z" parentGUID="6bab069e-4251-4714-a879-2fb09518a019" nodeTypeAlias="Image" path="-1,5816,5829"> <alt></alt> <umbracoBytes><![CDATA[5016]]></umbracoBytes> <umbracoExtension><![CDATA[png]]></umbracoExtension> <umbracoFile><![CDATA[{src: '/media/3560/an-logo_footer.png', crops: [ { "alias": "testimonial", "width": 65, "height": 65 }, { "alias": "Huge Image Banner", "width": 577, "height": 590 }, { "alias": "Page Header", "width": 1600, "height": 260 } ]}]]></umbracoFile> <umbracoHeight><![CDATA[49]]></umbracoHeight> <umbracoWidth><![CDATA[150]]></umbracoWidth> </Image>

The GetKey method returns empty guid as string, GetAlias() returns empty string and the Info element is null (because it doesnt exist)

Is there a special way to import older media items, or is this a bug?

uSync reports shows Angular template

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

Inaccurate change report for data types

Not sure if this is a bug or what exactly is going on, but on a few Umbraco v8 sites with uSync 8 installed (couple of different versions but 8.2.3 is included)

Data Types have been reporting that all of them have changed, however when examining them there are no actual changes that can be found.

For example, this is directly after an import:

image

image

image

It appears that it is trying up date sort orders, but no idea why.

These examples are from a v8.1.5 site.

It's a bit misleading seeing lots of changes that aren't "real" when doing a deployment, not sure what is causing it.

Media deserialization fails because of unknown type

Describe the bug
When importing media content usync content an error is reported for images.

To Reproduce
Steps to reproduce the behavior:

  1. Create an image content in media library
  2. Notice on save that media file has been created under the import folder
  3. Try to import the media on another workstation
  4. Notice that it fails with an error mentioning that the Media type cannot be found

Expected behavior
Any type of media should be importable

Additional context
Looking at the serialized media format it seems that the root node of a media content is always
and that the media deserializer assumes that it will find the actual type would be Image or Folder, etc...
I did a quick successful test to import media images replacing the root node with .
As a workaround for now since we are early in development we'll use this workaround to allow us to import medias.

UI based compare and sync (similar to Sql Server tools in Visual Studio)

I'd love it if the uSync UI was similar to the Sql Server comparison tools built into Visual Studio:

  • Side by side comparison of local, staging or production instances
  • Ability to visually select which items to port between the two instances, rather than manually deleting xml files from the file-system, then doing all-or-nothing import.
  • Content comparison should be more granular so individual fields can be sync'd rather than entire documents

Make ContentType based Serializers less 'chatty' with Umbraco

The Content Type based serializers (ContentTypes, MediaTypes, MemberTypes) all do a double pass of the settings, this can result in double saves.

this change aa9f86a makes the saves in the handlers conditional on things actually changing, (isDirty) which means they should save a lot less.

Feature: uSync Actions

Current

When its in listening mode , usync keeps track of things people delete and puts them in a uSyncAction.config file. On import this file is read, and things that match (usually by key) are deleted from the target site.

Options

It doesn't have to work like that, we could just put the deletes inline - by replacing the config file for an item with a file marking its deletion, then everything is just in place - deletes happen when uSync stumbled into the delete file.

Advantages

  • it's easier to code,
  • the presence of a random file in the root is unlikely to confuse people

Disadvantages:

  • Potentially harder to debug? - you have to hunt the files to find the delete
  • Exports might wipe it unintentionally ? Exports clear the folder this would loose all the deletes. at the moment there is an option to keep the actions file, which preserves it over exports

Content edition sync import does not respect content heirarchy & duplicates documents

Describe the bug
When importing content with ContentEdition, parent ids and the content heirarchy are not respected. All content is important at the root level and the ids of the imported content are reset. Also, the documents are imported every time an import is run, resulting in duplicates. Please see screenshot.

To Reproduce
Steps to reproduce the behavior:

  1. Export content with a heirarchy
  2. Import into another instance

Expected behavior
Would be great if there was a way to import/respect the content heirarchy.

Screenshots
Annotation 2019-04-23 101832

uSync doesn't synchronize published content

I have two Umbraco8 sites. One for development and second for testing. I have installed uSync, uSync.Core, uSync.ContentEdition and uSync.Backoffice.Core to the both of them. I set the settings Export on startup, import on startup, export on save on both of them. I have published content on the first one with text and images. First I started the first one and I went to usync and exported everything. Then I copied the View, Media and the Usync folder, the only ones I have to copy, and I copied them to the test site's folder. Then I imported them in the Testing site. The problem is next. In the Content Tab in the BackOffice, published Content Pages' names are faded out and they are proper document types but they are empty without text and images.

What can be the problem?

Import DataType custom PropertyEditor fails

Importing of datatype which uses custom property editors fail. I get the following error message.
"Import Fail: Cannot find underling datatype for Domain picker"

Steps to reproduce the behavior:

  1. Create a propertyEditor, I have this package.manifest file in App_Plugins
    { "propertyEditors": [ { "alias": "DomainPicker", "name": "Domain picker", "icon": "icon-list", "editor": { "view": "~/App_Plugins/DomainPicker/view.html" } } ], "javascript": [ "~/App_Plugins/DomainPicker/controller.js" ] }
  2. Import the datatype in another Umbraco
  3. See error

usync-datatype-error

Issue with how GridMapper resolves aliases generated from view

The issue here stems from how the grid mapper extracts an alias from the view. The problem is that the view in the grid configuration often ends in ".html" which means the alias will always be "Umbraco.Grid.html" for controls with views like that. Take the following configuration for example.

{
    "name": "Blog Detail",
    "alias": "blogDetail",
    "view": "/App_Plugins/LeBlender/editors/leblendereditor/LeBlendereditor.html",
    "icon": "icon-defrag color-black",
    "render": "/App_Plugins/LeBlender/editors/leblendereditor/views/Base.cshtml",
    "config": {
        "frontView": "BlogDetail",
        "renderInGrid": "1",
        "editors": [
            {
                "name": "Body Text",
                "alias": "bodyText",
                "propretyType": {},
                "dataType": "ca90c950-0aff-4e72-b976-a30b1ac57dad",
                "description": "blog detail"
            }
        ]
    }
}

No need to worry about the leblender reference. I'm using a customized version of it that runs in umbraco 8.

The problem code can be found here. It grabs all the text after the last "." to generate the alias, which in this case leaves only "html." Removing the ".html" for strings that end with it should resolve this issue.

Fix - False positive when content has some empty values.

Sometimes you will get false posistive content changes, when the content item has empty values.
this is because the empty value sometimes comes to usync as an empty value and sometimes it isn't included , so the xml can be diffrent.

65d8217 adds an extra bit of XML to markate an empty value node - this means we will get better matches and less false posistives when checking content.

Dictionary Items - in Content Edition ?

At the moment I am minded to move Dictionary Items into Content Edition because they are content.

but they also can drive a lot of settings, buttons etc, so it's a open question

Execution Timeout Expired when importing content type changes

Hi, when trying to import settings we receive the following error (see bottom).

  • uSync v8.2.1.924 + Content Edition.
  • The database used is a Azure SQL database.
  • The update is to add 5 properties to a content type.
  • There are about 800 nodes usings this document type.

I changed the 'Connection timeout' property on connection string but it had no effect. It seems to rather be SQL's CommandTimeout that should be increased.

Thank you

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) in d:\a\1\s\src\Umbraco.Core\Persistence\FaultHandling\RetryPolicy.cs:line 172
at NPoco.Database.ExecuteScalarHelper(DbCommand cmd)
at NPoco.Database.ExecuteScalar[T](String sql, CommandType commandType, Object[] args)
ClientConnectionId:809b4e9e-1d0d-49ff-8ac3-0386f4539795
Error Number:-2,State:0,Class:11
ClientConnectionId before routing:fbc7fa39-f3d6-4b4e-8d32-f9b15aa7cf82
Routing Destination:e0688902d0bd.tr3.canadacentral1-a.worker.database.windows.net,11133`

Export on save cause an error

The functionnality "Export on Save" of Usync 8 generate an error. The document is saved, but it's not published.

Error when publichig a document - > Server error : Contact administrator, see log full details
Object reference not set to an instance of an object.

As previously said, the document is fully save, but since the error happend on the save event, it's not published. When the "Export on Save" is deactivated, everything works fine.

uSync reports change, but then there is nothing shown in details

Sometimes running a report will say there is a change, but there will be nothing when you look in changes.

in short - the tracker is work in progress.

at the moment usync does two things for tracking changes.

  1. the quick check

    1. uSync takes the xml on disk and generates in memory and xml file for the item.
    2. the hash of the type files is compared -
    3. if it's different then an item is marked as changed.
  2. the full check

    1. again the disk xml is compared to an in-memory XML file for the item
    2. for this we use 'tracker' classes to tell us what can be different in the xml and what that means
    3. the full check walks the xml tree for each file and works out what nodes/attributes have changed and displays them

Issues at the moment :

  1. blank xml nodes can sometimes be written or exactly how can depend on what umbraco reports the value to be (e.g null or empty) this causes issues because the hash of the files might be different but walking the xml they are the same.
  2. in content items blank values can cause issues, because there are multiple culture/segments, sometimes they return null, sometimes blank, and this causes a extra node to be inserted in the xml, again causing a mismatch in files but not in tree comparisons.

uSync Deletes a parent language instead of child based on ISO Code

Placeholder for bb215c6

An issue in localization service means requesting "en-US" language can return "en" language instead, in the worst case this causes uSync to delete the wrong language, which can loose content.

Workaround is to check that the langauge you requested is infact the one you got back.

Casing inconsistency causing trouble

Hi,

In the latest version, on line 38 of uSyncDashboardController the current code expects result.data.addOnString, but result.data contains AddOnString - which is causing a good deal of errors in console.

DocType import error

Describe the bug
When importing one of the documents, I get an error:
Import Fail: Object reference not set to an instance of an object.
Шt looks like one of the operations exceeds the timeout.
I have caught look in database:
Directly Blocked Transactions:
Blocking SQL Statement
SELECT [umbracoDocument].[nodeId] AS [NodeId], [umbracoDocument].[published] AS [Published], [umbracoDocument].[edited] AS [Edited] , [umbracoContent].[contentTypeId] AS [ContentDto__ContentTypeId], [umbracoContent].[nodeId] AS [ContentDto__NodeId] , [umbracoNode].[id] AS [ContentDto__NodeDto__NodeId], [umbracoNode].[uniqueId] AS [ContentDto__NodeDto__UniqueId], [umbracoNode].[parentId] AS [ContentDto__NodeDto__ParentId], [umbracoNode].[level] AS [ContentDto__NodeDto__Level], [umbracoNode].[path] AS [ContentDto__NodeDto__Path], [umbracoNode].[sortOrder] AS [ContentDto__NodeDto__SortOrder], [umbracoNode].[trashed] AS [ContentDto__NodeDto__Trashed], [umbracoNode].[nodeUser] AS [ContentDto__NodeDto__UserId], [umbracoNode].[text] AS [ContentDto__NodeDto__Text], [umbracoNode].[nodeObjectType] AS [ContentDto__NodeDto__NodeObjectType], [umbracoNode].[createDate] AS [ContentDto__NodeDto__CreateDate] , [umbracoDocumentVersion].[id] AS [DocumentVersionDto__Id], [umbracoDocumentVersion].[templateId] AS [DocumentVersionDto__TemplateId], [umbracoDocumentVersion].[published] AS [DocumentVersionDto__Published] , [umbracoContentVersion].[id] AS [DocumentVersionDto__ContentVersionDto__Id], [umbracoContentVersion].[text] AS [DocumentVersionDto__ContentVersionDto__Text], [umbracoContentVersion].[versionDate] AS [DocumentVersionDto__ContentVersionDto__VersionDate], [umbracoContentVersion].[nodeId] AS [DocumentVersionDto__ContentVersionDto__NodeId], [umbracoContentVersion].[userId] AS [DocumentVersionDto__ContentVersionDto__UserId], [umbracoContentVersion].[current] AS [DocumentVersionDto__ContentVersionDto__Current] , [pdv].[id] AS [PublishedVersionDto__Id], [pdv].[templateId] AS [PublishedVersionDto__TemplateId], [pdv].[published] AS [PublishedVersionDto__Published] , [pcv].[id] AS [PublishedVersionDto__ContentVersionDto__Id], [pcv].[text] AS [PublishedVersionDto__ContentVersionDto__Text], [pcv].[versionDate] AS [PublishedVersionDto__ContentVersionDto__VersionDate], [pcv].[nodeId] AS [PublishedVersionDto__ContentVersionDto__NodeId], [pcv].[userId] AS [PublishedVersionDto__ContentVersionDto__UserId], [pcv].[current] AS [PublishedVersionDto__ContentVersionDto__Current] , COALESCE([ccv].[name],[umbracoNode].[text]) AS variantName FROM [umbracoDocument] INNER JOIN [umbracoContent] ON [umbracoDocument].[nodeId] = [umbracoContent].[nodeId] INNER JOIN [umbracoNode] ON [umbracoContent].[nodeId] = [umbracoNode].[id] INNER JOIN [umbracoContentVersion] ON ([umbracoDocument].[nodeId] = [umbracoContentVersion].[nodeId]) INNER JOIN [umbracoDocumentVersion] ON ([umbracoContentVersion].[id] = [umbracoDocumentVersion].[id]) LEFT JOIN [umbracoContentVersion] [pcv] INNER JOIN [umbracoDocumentVersion] [pdv] ON (([pcv].[id] = [pdv].[id]) AND [pdv].[published] = @0) ON ([umbracoDocument].[nodeId] = [pcv].[nodeId]) LEFT JOIN [umbracoContentVersionCultureVariation] [ccv] INNER JOIN [umbracoLanguage] [lang] ON (([ccv].[languageId] = [lang].[id]) AND ([lang].[languageISOCode] = @1)) ON ([umbracoContentVersion].[id] = [ccv].[versionId]) WHERE (([umbracoNode].[nodeObjectType] = @2)) AND ([umbracoContentVersion].[current] = @3) AND ([umbracoContent].[contentTypeId] IN (@4)) ORDER BY [ContentDto__NodeDto__Path] , [ContentDto__NodeDto__NodeId] OFFSET @5 ROWS FETCH NEXT @6 ROWS ONL
Blocked SQL Statement
UPDATE umbracoLock SET value = (CASE WHEN (value=1) THEN -1 ELSE 1 END) WHERE id=@

uSync Chauffeur for Umbraco 8

Are there any plans to bring a command line solution for Usync and Umbraco 8?

I've read about chauffeur for Umbraco 7 and it sounds like something that would be very beneficial to have in 8

Angular Services not using relative paths,

Some of the Angular code isn't using relative paths to get other files, (for example /app_plugins/uSync8/settings/default.html)

this fails if Umbraco is installed in a subfolder,

need to reference the app path from the Umbraco Settings.

Export (v8) does not remove existing files/folder

Hi.
When exporting configs, the existing folders and files are not removed. I'm using Umbraco v8.0.2 and uSync release version (8.0.0)

Steps to reproduce: files not removed

  1. Export
  2. Delete a document type
  3. Export again
    The deleted document type remains on disk

Steps to reproduce: folders not removed

  1. Create a folder in Document Types and create a Document Type inside
  2. Export
  3. Rename the folder
  4. Export again
    The new folder is serialized and the old one stays on disk, - the doc.type definition is duplicated.
    Running the Report action shows the definition needs to be Updated..

Feature: Culture Based Publishing

Content is currently published or not, we are not doing anything with the published state for each culture.

b021d9c addresses this, and turns on culture based publishing of content.

Method missing

Describe the bug
After updating umbraco to v7.15.0 usync throws a '[MissingMethodException: Method not found: 'Umbraco.Core.Models.EntityBase.IUmbracoEntity Umbraco.Core.Services.IEntityService.GetByKey(System.Guid, Boolean)'.]'

To Reproduce
Update Umbraco to v7.15.0.
Run the site.

I have checked the Umbraco code and the IEntityService.GetByKey(System.Guid, Boolean) method is there. The site was working with 7.14.0.

Language Import on uSync 8

when importing multiple languages, the import could fail. Possibly the fallback language is not yet imported. Invisible in the report, and mess up totally the content import.

Fix - Improve empty description matching.

In a content element, an empty description will come back as null, (not empty string)
9d64334 makes sure an empty string in the config is treated as null, so we get a better match and one less false positive.

Known Issue: Per Handler Actions Not Implimented

Not Implimented
Per handler actions allow you to turn a handler on/off for specific actions

e.g to have a handler only work on import

 <Handler Alias="dataTypeHandler" Enabled="true" actions="Import"/>

the default is ALL.

Known Issue: File Format Change

uSync 8 has a different file format to usync 4 - as such you cannot just upgrade and have the files still work.

There are a many internal changes (espeically around content items) within Umbraco, and we have used this oppertunity to make the usync format consistant across all items.

Most if not all of the same information is stored in the files and as they are xml there should be some form of transformations that could be built to migrate the information from the old format to the new one, but that hasn't been built (yet)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.