Wondering if anyone has any suggestions for this i...
# package-development
l
Wondering if anyone has any suggestions for this issue that’s been raised on my “admin only” property. Sorry to call on you @Kevin Jump but it involves the package “wrapping” a custom data type and then uSync Complete not detecting the underlying dependency on the custom data type when pushing content. 🙏 https://github.com/LottePitcher/umbraco-admin-only-property/issues/16
k
I suspect it needs a ISyncMapper - to tell uSync what the underling datatype is , mainly because uSync.Complete will need to know what the dependencies are .
I would suggest something in uSync.Community.Contrib (https://github.com/KevinJump/uSync/tree/v11/dev/uSync.Community.Contrib)
If it inherits the base class its prob "only" the GetDependencies method that needs to be implimented.
(likely you will need to do something similar with artifacts and converters for deploy 🤷‍♀️ )
I will take a look at the editor , see if can give more tips...
l
Thank you! I've put your comments over on the issue, never know that person might be keen enough to add support for this themselves!
And if I do need to need to build it, perhaps it would make an interesting UmbraCollab? @Sebastiaan
m
How is the wrapping stored? @Lotte
If its storing the uuid / guid it should just work
Actually I havent attempted to use Complete with feature flagged, so I might be wrong
l
It is now using the uid, an early version wasn't. I did a new release which changed to use uid so that it worked on deploy. But when I've pushed content up the Cloud pipeline, the data types have already existed in the destination environment as we've deployed the schema updates in advance. I haven't tried to 'wrap' a new custom data type and push content without deploying schema updates first. And think that is the specific (albeit uSync Complete not Cloud deploy) issue here
k
I think for most complete scenarios it will just work. when the data types are all synced, then it will be fine. The only issue is when someone pushes a bit of content between sites that contains the property and the data types haven't been synced. Then uSync.Complete does a dependency check to reconcile what other things (content types, data types) to send over with the content item to make it appear at the other end (deploy doesn't do this, so you don't need a deploy thing). because the admin property wraps another one, uSync doesn't know to send the wrapped property over too. so to work for that particular scenario it needs a "dependency checker" method which tells it , what the dependent data type is.
**unless of course you are wrapping something complex like nested/grid and then deploy & uSync might also need to know to - to work out what the dependent media / etc is *
l
Makes sense, thanks for clarifying that 🙏
2 Views