Bug #36234
closed
Uncaught TYPO3 Exception: Class t3lib_FlashMessage does not exist
Added by Ulfried Herrmann over 12 years ago.
Updated over 9 years ago.
Description
If 'displayErrors' is set to 1 in Install Tool a PHP notice may lead to an Uncaught TYPO3 Exception:
Uncaught TYPO3 Exception
Class t3lib_FlashMessage does not exist
ReflectionException thrown in file
/www/htdocs/xxx/typo3_src-4.7.0rc1/t3lib/class.t3lib_div.php in line 4844.
30 ReflectionClass::__construct("t3lib_FlashMessage")
/www/htdocs/xxx/typo3_src-4.7.0rc1/t3lib/class.t3lib_div.php:
04842: array_shift($constructorArguments);
04843:
04844: $reflectedClass = new ReflectionClass($finalClassName);
04845: $instance = $reflectedClass->newInstanceArgs($constructorArguments);
04846: } else {
29 t3lib_div::makeInstance("t3lib_FlashMessage", "PHP : Assigning the return value of new by referen…
...
This behaviour also occurs in TYPO3 version 4.7.
Please consider cleaning typo3temp/Cache/Code in order to renew the autoloader cache and tell us, whether this solved the issue.
Thanks.
Dear Markus,
I tried to reproduce this exception to test your suggestion - unfortunately without success at present. But I dimly remember the try to do this (and the exception remained), but I'm not sure.
Ulfried
So is this still an issue or not?
I'm a bit confused atm.
Dear Markus,
since I actually head this exception and Martin could confirm it I think it's still an issue. I'll keep trying to reproduce the behaviour in next days to tell you the preconditions for tracebility.
Best
Ulfried
Confirmed for 4.7.1 on my local dev environment (Win7 - XAMPP)
The error message appears in the workspace module.
Cleaning typo3temp/Cache/Code does not solve this Problem.
On our test machine (Linux) the workspace module shows a different error message (Class t3lib_lock does not exist).
I can confirm this issue on multiple instances of the same website (multiple servers) $TYPO3_CONF_VARS['SYS']['displayErrors'] = '0'; solves the problem.
WorkSpaces
router Class t3lib_FlashMessage does not exist
I can confirm this issue for 4.7.2
Michael Bakonyi wrote:
I can confirm this issue for 4.7.2
Also confirmed for 4.7.2.
In my case the error is caused by the fpdf extension which uses deprecated reference assigning. The error seems to be triggered when the errorHandler tries to collect PHP deprecated warnings.
Probably related to #23444
- Status changed from New to Needs Feedback
It really looks like the t3lib_FlashMessage
class isn't available, because the autoloader isn't initialised, while a message should be shown.
Could you give it a try and add
require_once (PATH_t3lib , 'class.t3lib_flashmessage.php');
to init.php for example here:
// *************************************************
// t3lib_div + extention management class included
// *************************************************
require_once(PATH_t3lib.'class.t3lib_div.php'); // The standard-library is included
require_once(PATH_t3lib.'class.t3lib_extmgm.php'); // Extension API Management library included
That would fix the issue indeed. Although the required classes must be included as well:
require_once (PATH_t3lib . 'message/class.t3lib_message_abstractmessage.php');
require_once (PATH_t3lib . 'class.t3lib_flashmessage.php');
Maybe even class.t3lib_message_errorpagemessage.php and class.t3lib_message_abstractstandalonemessage.php. But AbstractMessage was sufficient for my scenario.
Thanks for looking into it :-)
Philipp Wintermantel wrote:
That would fix the issue indeed. Although the required classes must be included as well:
require_once (PATH_t3lib . 'message/class.t3lib_message_abstractmessage.php');
require_once (PATH_t3lib . 'class.t3lib_flashmessage.php');
Maybe even class.t3lib_message_errorpagemessage.php and class.t3lib_message_abstractstandalonemessage.php. But AbstractMessage was sufficient for my scenario.
Thanks for looking into it :-)
Thanks Philipp! Works for me :-)!
I can confirm that the solution posted here solves the problem indeed.
As Philipp wrote the fpdf extension caused the error in my case too.
Thanks to all who contributed!
I also get this error when loading the external class [[http://sourceforge.net/projects/phpexcelreader/]] in a controller action.
Loading
require_once (PATH_t3lib . 'message/class.t3lib_message_abstractmessage.php');
require_once (PATH_t3lib . 'class.t3lib_flashmessagequeue.php');
require_once (PATH_t3lib . 'class.t3lib_flashmessage.php');
solves the problem.
Can confirm this bug for Typo3/4.7.4.
- Status changed from Needs Feedback to New
- Target version set to 7.4 (Backend)
- Is Regression set to No
Unable to reproduce this on current master.
- Status changed from New to Closed
Closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Also available in: Atom
PDF