TYPO3 Exception 1278450972¶
Note
Below, the TYPO3 community may have provided additional information or solutions for this exception. However, these may or may not apply to your particular case. If you can provide more information, you should come back here and add your experience and solution steps to this issue once you have resolved it.
General TYPO3 troubleshooting tips can be found in the section “Troubleshooting” of the menu, and live support is available in the TYPO3 Slack channel #typo3-cms.
To add your experience, click “Edit on GitHub” above and follow the “Edit on GitHub” workflow. Also check out our tip on Coding Style and reST.
#1278450972: Class … does not exist. Reflection failed. TYPO3 9.5¶
We had a whitespace at the beginning of the filename of the file containing the class.
When switching over from working with TYPO3 v10+ back to TYPO3 v9.5, remember that you have to specify the fully qualified name for parameters, as opposed to TYPO3 v10+ where you can import the class name.
#1278450972: Class … does not exist. Reflection failed. After updating to TYPO3 11¶
We missed the required update in the registration of plugins and modules to use the full class name.
See Breaking: #92609 - Use controller classes when registering plugins/modules.
#1278450972: Class … does not exist. Reflection failed. in TYPO3 11¶
Running composer update
fixes the problem in a Composer based installation of TYPO3.
#1278450972: The classname “…” was not found and thus can not be reflected.¶
This (extbase) error can occur if you have annotated a (controller
action) method using @param
but have not given it a type hint. If the
annotation is wrong this error will occur.
Example:
/**
* A test action
*
* @param \MyVendor\MyExtension\Domain\Motel\InvalidName $myVariable
*/
public function testAction($myVariable) {
As you see the @param
annotation is wrong. Because you usually have not
any Domain\Motel
namespace and there is no type hint for $myVariable
in the function header.
So either correct the annotation, clear all caches:
/**
* A test action
*
* @param \MyVendor\MyExtension\Domain\Model\ValidName $myVariable
*/
public function testAction($myVariable) {
Or try to add a type hint:
/**
* A test action
*
* @param \MyVendor\MyExtension\Domain\Model\ValidName $myVariable
*/
public function testAction(\MyVendor\MyExtension\Domain\Model\ValidName $myVariable) {
I had a Composer based Installation. And i have to add my ext. to the psr4 autoload in copmposer.json:
"autoload": {
"psr-4": {
"MyVendor\\MyExtension\\":"web/typo3conf/ext/MyExtension/Classes"
}
},
#1278450972 TYPO3CMSExtbaseReflectionExceptionUnknownClassException¶
Class Boolean does not exist. Reflection failed.
at TYPO3\CMS\Extbase\Reflection\ReflectionService->buildClassSchema('Vendorname\\Extensionname\\Domain\\Model\\MyModel')
Got this error because in MyModel was a setter with a wrong typehint, in my case it was something like
public function setFreeShipping(\Boolean $freeShipping)
Solution was to change \Boolean to bool.