I would like to add some validation on standalone publishing requiring two items of a custom type to be published together. At the moment I am doing this overriding the PostPhase hook to check items in the publish tree, this works and the error appears in the progress details, but the Validation message at the bottom of the Standalone Publisher (next to the Validate button) says validation successful.
Is it possible to change the Validation Successful message on the UI in the PostPhase hook?
or
Can you iterate through items in the publish tree in the Publish File hook?
I briefly looked at the code, but I’ve not tried to replicate it, it looks to me like a bug.
I’ll see if we can replicate it and then get it ticketed up.
Its also possible that we never intended that you would fail from the post hook, I’ll have to check.
That said you should be able to inspect the tree from the validation of the plugin, without using the post hook. You can get the item’s parent and then ask for the children, to inspect other items in the tree.
Yes I can see why it wouldn’t change the validation message as it’s the post validation phase. I’ve used the parent children approach in validation so I don’t need the post phase hook. Everything is good, thanks!