Error with ElasticSearch: PHPUnit\Framework\TestCase' not found
Closed this issue · 6 comments
Hey there,
I'm trying to use mksearch -> elasticsearch.
but i'm getting this error when pressing the search button:
Fatal error: Class 'PHPUnit\Framework\TestCase' not found in /var/www/edag/typo3conf/ext/rn_base/tests/class.tx_rnbase_tests_BaseTestCase.php on line 37
TYPO3 9.5.9
mkserach 9.5.3
rn_base 1.10.6
phpunit 6.5.14
This is what't in my Log File:
Fri, 13 Sep 2019 09:03:25 +0200 [WARNING] request="" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Use of undefined constant tx_mksearch_util_ServiceRegistry - assumed 'tx_mksearch_util_ServiceRegistry' (this will throw an Error in a future version of PHP) in /var/www/edag/typo3conf/ext/mksearch/action/class.tx_mksearch_action_ElasticSearch.php line 101
That's just a warning that shouldn't cause your problems. I fixed it anyway.
Backrace from Slack:
#0 include() called at [/var/www/typo3_src-9.5.9/vendor/composer/ClassLoader.php:444]
#1 Composer\Autoload\includeFile() called at [/var/www/typo3_src-9.5.9/vendor/composer/ClassLoader.php:322]
#2 Composer\Autoload\ClassLoader->loadClass() called at [/var/www/typo3_src-9.5.9/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php:130]
#3 TYPO3\ClassAliasLoader\ClassAliasLoader->loadClass() called at [/var/www/typo3_src-9.5.9/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php:120]
#4 TYPO3\ClassAliasLoader\ClassAliasLoader->loadClassWithAlias()
#5 spl_autoload_call()
#6 class_exists() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase.php:169]
#7 tx_rnbase::loadT3() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase.php:53]
#8 tx_rnbase::load() called at [/var/www/typo3conf/ext/rn_base/tests/class.tx_rnbase_tests_controller_testcase.php:27]
#9 include(/var/www/typo3conf/ext/rn_base/tests/class.tx_rnbase_tests_controller_testcase.php) called at [/var/www/typo3_src-9.5.9/vendor/composer/ClassLoader.php:444]
#10 Composer\Autoload\includeFile() called at [/var/www/typo3_src-9.5.9/vendor/composer/ClassLoader.php:322]
#11 Composer\Autoload\ClassLoader->loadClass() called at [/var/www/typo3_src-9.5.9/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php:130]
#12 TYPO3\ClassAliasLoader\ClassAliasLoader->loadClass() called at [/var/www/typo3_src-9.5.9/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php:120]
#13 TYPO3\ClassAliasLoader\ClassAliasLoader->loadClassWithAlias()
#14 spl_autoload_call()
#15 class_exists() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase.php:169]
#16 tx_rnbase::loadT3() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase.php:53]
#17 tx_rnbase::load() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase.php:84]
#18 tx_rnbase::makeInstance() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase_controller.php:317]
#19 tx_rnbase_controller->handleException() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase_controller.php:276]
#20 tx_rnbase_controller->doAction() called at [/var/www/typo3conf/ext/rn_base/class.tx_rnbase_controller.php:228]
#21 tx_rnbase_controller->main()
#22 call_user_func_array() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:5972]
#23 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->callUserFunction() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/ContentObject/UserContentObject.php:41]
#24 TYPO3\CMS\Frontend\ContentObject\UserContentObject->render() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:815]
#25 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->render() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:731]
#26 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:3813]
#27 TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->INTincScript_process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:3774]
#28 TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->recursivelyReplaceIntPlaceholdersInContent() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:3741]
#29 TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->INTincScript() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Http/RequestHandler.php:187]
#30 TYPO3\CMS\Frontend\Http\RequestHandler->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php:46]
#31 TYPO3\CMS\Frontend\Middleware\OutputCompression->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#32 class@anonymous->handle() called at [/var/www/typo3conf/ext/typoscript_rendering/Classes/Middleware/TypoScriptRenderingMiddleware.php:41]
#33 Helhum\TyposcriptRendering\Middleware\TypoScriptRenderingMiddleware->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#34 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php:44]
#35 TYPO3\CMS\Adminpanel\Middleware\AdminPanelDataPersister->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#36 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php:46]
#37 TYPO3\CMS\Adminpanel\Middleware\AdminPanelRenderer->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#38 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/ContentLengthResponseHeader.php:45]
#39 TYPO3\CMS\Frontend\Middleware\ContentLengthResponseHeader->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#40 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/ShortcutAndMountPointRedirect.php:65]
#41 TYPO3\CMS\Frontend\Middleware\ShortcutAndMountPointRedirect->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#42 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php:118]
#43 TYPO3\CMS\Frontend\Middleware\PrepareTypoScriptFrontendRendering->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#44 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php:99]
#45 TYPO3\CMS\Frontend\Middleware\PageArgumentValidator->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#46 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/MaintenanceMode.php:53]
#47 TYPO3\CMS\Frontend\Middleware\MaintenanceMode->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#48 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/PageResolver.php:162]
#49 TYPO3\CMS\Frontend\Middleware\PageResolver->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#50 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/redirects/Classes/Http/Middleware/RedirectHandler.php:70]
#51 TYPO3\CMS\Redirects\Http\Middleware\RedirectHandler->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#52 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php:66]
#53 TYPO3\CMS\Frontend\Middleware\StaticRouteResolver->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#54 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php:82]
#55 TYPO3\CMS\Frontend\Middleware\SiteBaseRedirectResolver->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#56 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php:58]
#57 TYPO3\CMS\Adminpanel\Middleware\AdminPanelInitiator->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#58 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php:68]
#59 TYPO3\CMS\Frontend\Middleware\SiteResolver->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#60 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php:49]
#61 TYPO3\CMS\Adminpanel\Middleware\SqlLogging->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#62 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php:95]
#63 TYPO3\CMS\Frontend\Middleware\BackendUserAuthenticator->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#64 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php:79]
#65 TYPO3\CMS\Frontend\Middleware\FrontendUserAuthenticator->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#66 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php:90]
#67 TYPO3\CMS\Frontend\Middleware\TypoScriptFrontendInitialization->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#68 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/EidHandler.php:50]
#69 TYPO3\CMS\Frontend\Middleware\EidHandler->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#70 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php:57]
#71 TYPO3\CMS\Frontend\Middleware\PreprocessRequestHook->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#72 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php:58]
#73 TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#74 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php:49]
#75 TYPO3\CMS\Frontend\Middleware\TimeTrackerInitialization->process() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138]
#76 class@anonymous->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:67]
#77 TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/AbstractApplication.php:108]
#78 TYPO3\CMS\Core\Http\AbstractApplication->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/frontend/Classes/Http/Application.php:69]
#79 TYPO3\CMS\Frontend\Http\Application->handle() called at [/var/www/typo3_src-9.5.9/typo3/sysext/core/Classes/Http/AbstractApplication.php:120]
#80 TYPO3\CMS\Core\Http\AbstractApplication->run() called at [/var/www/typo3_src-9.5.9/index.php:24]
#81 {closure}() called at [/var/www/typo3_src-9.5.9/index.php:25]
The problem is as follows. The PHP warning mentioned in the second comment is turned into a exception by TYPO3. This exception is handled by rn_base. The initial error message occurs during the exception handling. So it's a issue for rn_base. The PHP warning is fixed in the current master. So the initial error message should no longer occur as no exception needs to be handled anymore.
Thank you, for your really fast help. in spite the Problem is still there. Lets see what rn_base is doing
Do you still get the entry about the PHP warning in your log file?