Bug #36234

Uncaught TYPO3 Exception: Class t3lib_FlashMessage does not exist

Added by Ulfried Herrmann over 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2012-04-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #23444: t3lib_error_Exception not available in some casesClosedSteffen Kamper2010-08-24

Actions
#1

Updated by Martin Bless about 9 years ago

Confirmed for 4.5.15!

#2

Updated by Markus Klein about 9 years ago

Please consider cleaning typo3temp/Cache/Code in order to renew the autoloader cache and tell us, whether this solved the issue.
Thanks.

#3

Updated by Ulfried Herrmann about 9 years ago

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

#4

Updated by Markus Klein about 9 years ago

So is this still an issue or not?
I'm a bit confused atm.

#5

Updated by Ulfried Herrmann about 9 years ago

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

#6

Updated by Simon Apold about 9 years ago

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).

#7

Updated by Noel Bossart about 9 years ago

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

#8

Updated by Michael Bakonyi about 9 years ago

I can confirm this issue for 4.7.2

#9

Updated by Philipp Wintermantel almost 9 years ago

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

#10

Updated by Steffen Gebert almost 9 years ago

  • 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

#11

Updated by Philipp Wintermantel almost 9 years ago

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 :-)

#12

Updated by Sebastian Sommer almost 9 years ago

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 :-)!

#13

Updated by Ulfried Herrmann almost 9 years ago

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!

#14

Updated by Pascal Dürsteler almost 9 years ago

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.

#15

Updated by Andreas Mayer almost 9 years ago

Can confirm this bug for Typo3/4.7.4.

#16

Updated by Alexander Opitz about 8 years ago

  • Status changed from Needs Feedback to New
#17

Updated by Mathias Schreiber over 6 years ago

  • Target version set to 7.4 (Backend)
  • Is Regression set to No
#18

Updated by Frederic Gaus over 6 years ago

Unable to reproduce this on current master.

#19

Updated by Riccardo De Contardi about 6 years ago

  • 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