Tried the above query and setting and get the same error.
Looking at the error in the browser doing an inspect element the error shows as
jquery-migrate.js:21 JQMIGRATE: Logging is active
www.joctest.org.uk/administrator/index.php
Failed to load resource: the server responded with a status of 404 (Category not found)
Having added debug etc (sorry, should have done that first...)
The call stack is
Category not found
Call stack
# Function Location
1 JApplicationCms->execute() JROOT/index.php:40
2 JApplicationSite->doExecute() JROOT/libraries/cms/application/cms.php:251
3 JApplicationSite->dispatch() JROOT/libraries/cms/application/site.php:237
4 JComponentHelper::renderComponent() JROOT/libraries/cms/application/site.php:191
5 JComponentHelper::executeComponent() JROOT/libraries/cms/component/helper.php:332
6 require_once() JROOT/libraries/cms/component/helper.php:352
7 JControllerLegacy->execute() JROOT/components/com_content/content.php:16
8 ContentController->display() JROOT/libraries/legacy/controller/legacy.php:730
9 JControllerLegacy->display() JROOT/components/com_content/controller.php:79
10 ContentViewCategory->display() JROOT/libraries/legacy/controller/legacy.php:693
11 JViewCategory->commonCategoryDisplay() JROOT/components/com_content/views/category/view.html.php:72
12 JError::raiseError() JROOT/libraries/legacy/view/category.php:129
13 JError::raise() JROOT/libraries/legacy/error/error.php:253
I have copied the profile information and database queries into the attached file