You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
When CI is run on different computers, the NodeIDs being assigned are not necessarily consitent. Therefore the matching of parent nodes by id here is not working.
Suggest changing to matching by NodeParentGUID instead.
The text was updated successfully, but these errors were encountered:
TL;DR - Please install v0.3.1 of the NuGet packages and your issue should hopefully be resolved!
Setting the NodeParentID when persisting the component data was originally done to support adding "Pages" fields to components because the relationships need to reference the component's "parent" node rather than the component itself. NodeParentID is an existing property on TreeNode so it was convenient to use that rather than adding more of my own code, but I hadn't thought about this scenario!
I thought of a few ways to tackle it:
Don't persist the NodeParentID and just set it when instantiating the component at runtime
Use a custom field to store a guid reference to the "parent" or some other reference that will persist between CI runs (as you have suggested)
Try to hook into the relevant CI operations and "translate" the NodeParentID to the appropriate value when CI is executed
I decided against option 2 because it doesn't feel like I should have to add additional fields to get the "parent" when there are already existing properties for doing that - I'm not dead set against this, but it just didn't "feel" right.
I went for option 1 in the end though there is a slight cost to this if you use nested components (i.e. components that themselves have components) as the code will walk up the tree until it finds the first "parent" that isn't a component. For "top-level" components though (the most common scenario from what I can gather of people using this module) the component is resolved in the context of the "parent" so setting the reference at runtime is a straight-forward assignment.
I have also raised issue #8 to investigate option 3 as that feels like a "better" option though a) there is a blocker in me investigating that due to not having a CI-enabled license for this project; and b) it felt like potentially a lot of effort for not much additional value (at this point at least)!
v0.3.1 of the packages have been released to NuGet with the changes to support option 2 - hopefully this will resolve your issue :)
When CI is run on different computers, the
NodeID
s being assigned are not necessarily consitent. Therefore the matching of parent nodes by id here is not working.Suggest changing to matching by
NodeParentGUID
instead.The text was updated successfully, but these errors were encountered: