Improve Handling of Parent-Child Relationships#457
Open
Hoikas wants to merge 4 commits into
Open
Conversation
The code was treating the nonfatal error raised at the end of the export process like any other exception and printing an aborted/failure indicated message, along with the errors. In reality, these are already printed out, so don't do anything special with these.
If the parent object is disabled or the page the parent object is in is disabled, then we should probably not export that child object at all. We have reports of child objects not being in the same page as parent objects causing issues, so we'll also surface that as a more concerning non-fatal error that actually pops up at the end of the export process.
This really only detects the case of the parent object being explicitly turned off. That's the big one, to be honest.
Sometimes, we really want to know "is this object going to be exported?". The Plasma Object "enabled" really just means "the user wants this to export", and the "is_tree_enabled" means "it looks like this object can export".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the parent/child object process by showing a noisy warning at the end of the export if an object is parented to an object in another page. Also, for safety, if a parent object is disabled either explicitly or by being in a disabled page, that child object is implicitly disabled, and a warning is printed to the log.
These mitigations should fix #453.