Allow Page::getSiteHomePageID to use default site (fixes upgrade from 5.7) #7912
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 allows Page::getSiteHomePageID to use the default site and return its home page id.
Currently when upgrading from 5.7 the migrations will fail as it tries to get the locale home page id as they don't exist when trying to install the new version 8 Pages. They are installed after, since getSiteHomePageID should generally return something, its best to return the default site HomePageID rather than HOME_CID/1