This PR can be summarized in the following changelog entry:
DB Mounts of a backend user are now taken into account within the Overview module
Pagination has been updated to prevent long lists with number-links
Improved error handling within the preview, request exceptions (Guzzle) are now catched and PHP8 does not throw an error when the metatag x-yoast-title-config cannot be found in the frontend
Relevant technical choices:
Introduced PageAccessUtility which retrieves all the possible page ids a user has access to
The result is (statically) cached because this is needed multiple times on 1 Overview request
Retrieving all the page ids is done the same way in core (for the page tree)
Because of possible huge IN () queries, the queries that need these page ids are being chunked (also same way as in core)
Created a constant PAGE_FIELDS to set a minimum amount of fields needed for the overviews, previous * selects caused memory issues
Pagination classes are now within the extension itself (and not only for v9), because of the SimplePagination class not being good enough for handling huge overviews with lots of page numbers
Test instructions
This PR can be tested by following these steps:
Pull branch
See if the Overview module now works based on DB mounts, and if the pagination is working correctly
See if the preview still works and can handle a 404 now
Quality assurance
[X] I have tested this code to the best of my abilities
[ ] I have added unittests to verify the code works as intended
Summary
This PR can be summarized in the following changelog entry:
x-yoast-title-config
cannot be found in the frontendRelevant technical choices:
PageAccessUtility
which retrieves all the possible page ids a user has access toIN ()
queries, the queries that need these page ids are being chunked (also same way as in core)PAGE_FIELDS
to set a minimum amount of fields needed for the overviews, previous*
selects caused memory issuesSimplePagination
class not being good enough for handling huge overviews with lots of page numbersTest instructions
This PR can be tested by following these steps:
Quality assurance
Fixes #342