Details
-
Bug
-
Resolution: Fixed
-
Minor
-
COmanage Match 1.0.0 (Suitable Pear)
-
PHP 7.3.27 / RHEL 7 / Apache 2.4
Description
If the header "Accept: application/json" is set in a Match API request, the server returns a 500 error with the following stack trace:
2021-09-04 01:04:52 Error: [Cake\View\Exception\MissingTemplateException] Template file "TierApi/json/response.ctp" is missing.
#0 /opt/comanage/match-develop/app/vendor/cakephp/cakephp/src/View/SerializedView.php(104): Cake\View\View->_getViewFileName('TierApi/json/re...')
#1 /opt/comanage/match-develop/app/vendor/cakephp/cakephp/src/View/JsonView.php(107): Cake\View\SerializedView->render('response', NULL)
#2 /opt/comanage/match-develop/app/vendor/cakephp/cakephp/src/Controller/Controller.php(796): Cake\View\JsonView->render('response', NULL)
#3 /opt/comanage/match-develop/app/src/Controller/TierApiController.php(415): Cake\Controller\Controller->render('response')
#4 /opt/comanage/match-develop/app/src/Controller/TierApiController.php(671): App\Controller\TierApiController->doMatchRequest(true)
#5 /opt/comanage/match-develop/app/vendor/cakephp/cakephp/src/Controller/Controller.php(610): App\Controller\TierApiController->search()
#6 /opt/comanage/match-develop/app/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(120): Cake\Controller\Controller->invokeAction()
#7 /opt/comanage/match-develop/app/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(94): Cake\Http\ActionDispatcher->_invoke(Object(App\Controller\TierApiController))
(etc. ...)
(Copying TierApi/response.ctp to TierApi/json/response.ctp does fix the problem, as does removing the header.)