In certain cases, we want to create pages automatically using the event system. While doing that we're running into an issue with certain pages that have a Region.
We're succeeding in creating and saving pages that have no regions, but whenever we try to create and save a page with a region 'Main' we get an error stating that there is no region 'Main'.
Our code:
We're 100% sure the NestedRegion we're getting from the RegionSchema is the 'Main' region with the correct RegionSchema.