Basically I'm running a website using uSync for deployment. Now every time I deploy changes to production it seems uSync is moving my content pages all around which I then have to manually re-order them on production. Sometimes it does not send content through as well.
For example, I have a tree as shown on the image above. Now if I update or add new Special Offer and deploy to production uSync will move all or a few Offers out of their parent node Special Offers and place them randomly in the hierarchy. This is really painful.
I'm running other websites as well but this issue does not happen to those so I'm not sure why. Could someone please shed a light on this matter? Many thanks.
I'm using Umbraco version 7.5.3, uSync version 3.2.2.740
I think it sounds like the content files on the disk are out of sync somehow ?
the sort order is a int value on each content item and is set when usync imports the values, so they don't necessarily follow a 1,2,3,4. if there is a usync file with a higher value it will just go in the order in the wrong place.
thinking a bit about it i am not 100% sure if the save events are getting fired by umbraco when you do a sort (so when you sort in the interface, there should be a save of each content type to save the sort order - this is what usync will hook into). I will have a play around .
the 'quick' fix for you might just to be save each content item in that part of the tree on the source umbraco site, the will ensure the sort orders are right in the usync files, and this should solve it.
Thanks for your info. That reminds me of the existing code I wrote before. Basically I wrote an event handler called OfferContentPublishEventHandler where whenever I create new Offer the handler will copy the content and put it in the websites depending on my selection, for example Subaru Melbourne and Subaru Docklands. See image below. By doing this way I only create Offer once and can deploy to multi sites easily (we have 17 sites). Do you think this is causing the issue? I copied the code snippet below the image so that you can have a look? Thanks
uSync stuffs up tree node hierarchy
Hope you can help me out of this.
Basically I'm running a website using uSync for deployment. Now every time I deploy changes to production it seems uSync is moving my content pages all around which I then have to manually re-order them on production. Sometimes it does not send content through as well.
For example, I have a tree as shown on the image above. Now if I update or add new Special Offer and deploy to production uSync will move all or a few Offers out of their parent node Special Offers and place them randomly in the hierarchy. This is really painful.
I'm running other websites as well but this issue does not happen to those so I'm not sure why. Could someone please shed a light on this matter? Many thanks.
I'm using Umbraco version 7.5.3, uSync version 3.2.2.740
Hi,
I think it sounds like the content files on the disk are out of sync somehow ?
the sort order is a int value on each content item and is set when usync imports the values, so they don't necessarily follow a 1,2,3,4. if there is a usync file with a higher value it will just go in the order in the wrong place.
thinking a bit about it i am not 100% sure if the save events are getting fired by umbraco when you do a sort (so when you sort in the interface, there should be a save of each content type to save the sort order - this is what usync will hook into). I will have a play around .
the 'quick' fix for you might just to be save each content item in that part of the tree on the source umbraco site, the will ensure the sort orders are right in the usync files, and this should solve it.
Hi Kevin,
Thanks for your info. That reminds me of the existing code I wrote before. Basically I wrote an event handler called OfferContentPublishEventHandler where whenever I create new Offer the handler will copy the content and put it in the websites depending on my selection, for example Subaru Melbourne and Subaru Docklands. See image below. By doing this way I only create Offer once and can deploy to multi sites easily (we have 17 sites). Do you think this is causing the issue? I copied the code snippet below the image so that you can have a look? Thanks
class OfferContentPublishEventHandler : IContentPublishEventHandler { private readonly ILogger _logger; private readonly UmbracoHelper _umbracoHelper;
Hi Kevin,
Did you have a chance to play around with what you mentioned above? Are you able to confirm my previous post? Many thanks.
Regards,
TP
is working on a reply...