Project

General

Profile

Actions

Bug #73520

closed

Class not found on cleanup all caches via BE on Windows

Added by ISA GmbH about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
composer
Start date:
2016-02-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
medium
Is Regression:
Yes
Sprint Focus:
Stabilization Sprint

Description

i have a strange issus on my development server. If go to InstallTool and clear all caches and the following error appears:

Detected Fatal Error
Class 'GeorgRinger\News\Utility\EmConfiguration' not found in /var/www/dev/htdocs/typo3conf/ext/news/ext_localconf.php on line 6

This happens with different extensions e.g.: powermail, news and autoloader.
In the typo3temp folder the autoload-tests/ folder is created but not the autoload/ folder.

On my local development all works fine.


Files

73520_ClassMapGenerator.patch (670 Bytes) 73520_ClassMapGenerator.patch Christian Brinkert, 2016-02-18 18:46
clearcache.JPG (44.8 KB) clearcache.JPG Philipp Faber, 2016-04-17 17:53

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #75728: Class not found in various extensions when Clearing all Caches in the install tool Rejected2016-04-18

Actions
Is duplicate of TYPO3 Core - Bug #72782: Escape Windows realpath for blacklist generation in ClassLoadingInformationGenerator::createClassMapClosedNicole Cordes2016-01-17

Actions
Actions #1

Updated by Markus Klein about 8 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (7.6.3)

It is extremely hard to tell what might go wrong. Please get in touch with us on Slack (typo3-cms channel) and ask for help there.

Actions #2

Updated by Christian Brinkert about 8 years ago

Same issue here, after removing all named extensions: tx_news, powermail, tt_address, ... the page will be shown in front- and backend. But any installation of that previously named extensions will lead to an other error:

#1: PHP Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 5 in D:\t3-763\typo3\sysext\core\Resources\PHP\ClassMapGenerator.php line 84
Actions #3

Updated by Markus Klein about 8 years ago

Very weird, seems like there is a problem with the PCRE library, which takes care of the regular expression.
Which version do you use? PCRE and PHP?

Actions #4

Updated by Christian Brinkert about 8 years ago

It's really really weird, I agree. Currently I can't reproduce the error anymore, since I tested a simple patch and by now even not without the patch.

The error occured after clearing the cache by the install tool, as described by "ICA GmbH" above. After manually removal of the extensions (deleting the entries in LocalConfiguration.php and PackageStates.php) I tried to install the extension by extension manager and the following error occured:

#1: PHP Warning: preg_match(): Compilation failed: unknown property name after \P or \p at offset 5 in D:\Projects\t3-763\typo3\sysext\core\Resources\PHP\ClassMapGenerator.php line 84
I've debugged the script and found that in the named class / line an comparission (preg_match) between a $blacklist and $filePath will be done. The error only occures if
  1. you work in windows
  2. your project resides in a folder with a startin "p", just like "D:\Projects\t3-763\..."
  3. and you have some extensions installed which excludes some paths from autoloading, just like realurl

In this case a $blacklist has the value like:

'{(D:\Projects\t3-763\...realurl\...|D:\Projects\t3-763\...)}'

and here the escape sequence "\P" exists, which PHP preg_match interpret as \P{XX} a unicode property, which can't be found.

So I changed the line 84 the file: "ClassMapGenerator.php" from

if ($blacklist && preg_match($blacklist, strtr($filePath, '\\', '/'))) {

to

if ($blacklist && preg_match(strtr($blacklist, '\\', '/'), strtr($filePath, '\\', '/'))) {

Et voila, the error dismissed and will no longer been seen ... (hope so... :-))
Don't know if there is something to do or patch, for now I will wait and see.

regards
Christian

Actions #5

Updated by Markus Klein about 8 years ago

  • Subject changed from Class not found on cleanup all caches via BE to Class not found on cleanup all caches via BE on Windows
  • Category set to composer
  • Status changed from Needs Feedback to Accepted
  • Priority changed from Should have to Must have
  • Target version set to Candidate for patchlevel
  • Complexity set to medium
  • Is Regression changed from No to Yes
  • Sprint Focus set to Stabilization Sprint

Thanks for debugging that. very helpful information.
Can you push a patch to gerrit?

Actions #6

Updated by Christian Brinkert about 8 years ago

Don't know if correct to add the patch here ...

Actions #7

Updated by Markus Klein about 8 years ago

Not quite, we use Gerrit for managing patches.

Did you know http://wiki.typo3.org/CWT?
This provides everything to get you started on your Core contribution.
If you have questions, feel free to ask on Slack.

Actions #8

Updated by Markus Klein about 8 years ago

I took a quick look at the file now and realized that this is actually third party code from composer. I wonder how such a bug would have been undiscovered there for so long. We need to investigate if the error is actually happening much earlier at the point where the blacklist is constructed.

Actions #9

Updated by Markus Klein about 8 years ago

The problem seems to be in typo3/sysext/core/Classes/Core/ClassLoadingInformationGenerator.php:150

$blacklistPathPrefix = realpath($classesPath);

realpath is documented to:

On windows realpath() will change unix style paths to windows style.

This is exactly your problem here.

Actions #10

Updated by Helmut Hummel about 8 years ago

  • Status changed from Accepted to Closed

closed as duplicate

This is fixed in master already. I missed to backport it to 7.6.

I've done so now.

Actions #11

Updated by Philipp Faber about 8 years ago

I am getting this error as well and I am on TYPO3 7.6.5 Linux! Interestingly enough, I have the same installation on a windows system and there are no errors! When I click Clear all cache in the install tool, I get this error:

Load extension configuration
The system detected a fatal error during script execution and redirected to this module. Your loaded extensions are now checked for possible problems. After incompatible extensions are unloaded, you can restart the initial action to proceed your request.

Detected Fatal Error
Class 'GeorgRinger\News\Utility\EmConfiguration' not found in /html/typo3/typo3conf/ext/news/ext_localconf.php on line 6
Check for broken extensions

Checks whether the local extensions' ext_tables and ext_localconf files can be included without errors, meaning they can be loaded without breaking the system.

I added a screenshot as well. Same thing as described above: When uninstalling the news extension, I get the same error with powermail and so on.

Actions #12

Updated by Helmut Hummel about 8 years ago

Philipp Faber wrote:

I am getting this error as well and I am on TYPO3 7.6.5 Linux!

Please create a new ticket, as this was clearly about a bug on Windows systems.

Please add steps to reproduce and/or as much info about your setup as possible (composer, non composer,etc.)

Actions

Also available in: Atom PDF