Error: Call to a member function getCleanUrl() on null in /var/www/doris/web/modules/composer/search_api_page/src/Controller/SearchApiPageController.php on line 40
To replicate:
Disable core search module.
Create an index in search api.
Create a search page with a path of /search
, I have not tested with a different path yet.
Delete the index in search api
Browse to /search and get the error previously mentioned.
I'm assuming at this stage, that the action of deleting the index deletes the page that uses it but not it's path.
Comment | File | Size | Author |
---|---|---|---|
#2 | error_access_url_of-2801021-2.patch | 772 bytes | mr.baileys |
Comments
Comment #2
mr.baileysThat is correct, the Search API Page config entity has a dependency on the Search API Index, so when the latter is deleted, the Search API Page is removed too. Routes cannot declare a dependency on a config entity (I think), so the route to the page remains unaffected. If you force the routes to be rebuild, you will get the expected 404 rather than the fatal error.
Since the Search API Page has been cleaned up, all we need to do is force a router rebuild, patch attached. This still needs tests, but since HEAD is current broken (#2825685: Tests are currently broken.), I'll hold off on writing those until that patch lands.
Comment #6
mr.baileysTests are fixed now that #2825685: Tests are currently broken. has landed, back to needs review.
Comment #7
borisson_Looks good, a test could be useful but not needed I think.
Comment #9
swentel CreditAttribution: swentel commented