From earlier posts I found responses that one of the most common way to validate a content component or keyword, or whatever, is to open the component and try to save it.
What is the advised process to test, if a component is valid against it's schema, in a multipublication environment like below?
There may be a certain localized schema under Pub2 different than under Pub1. It may have changed under pub2, so that the same content coming from pub1 could be valid against a certain schema from pub1, but the same component under pub2, could be invalid against the localized(but same tcm) schema under pub2. How to validate a component under Pub2 in this case, which is not localized yet there under pub2?
- should lokalize the content component under Pub2, try to save it if it fails, then it's invalid under pub2.
- After trying to save it, should unlocalize the component to restore the original state
if the component was localized already, should only try to save the component, but after the save test, if the save succeeded, then should rollback the operation in order to restore the original state of the component.
- Is this a realistic scenario at all? To have a localized and changed, incompatible schema under a child publication?
- The approach I described should be taken, right? I mean, it would NOT be OK to try to save the component inside the publication where it comes from? As it should be valid under the "target" publication, right? But not sure how realistic is that... It involves more work and more steps to go through this process.
Asking your opinion because I'm in progress of automatizing component validation... and wondering if I'm overthinking this or not, do I relly have to implement the above processes of localizing, saving, unlocalizing, rolling back, etc. or it could be made more simple?