Typo3 8.7: Could not analyse class: maybe not loaded or no autoloader? Keeps coming and going

I have had this problem as seen in the title in the past and I always resolved this issue by adding the psr-4 autoloader in the emconf and simply reactivate my extensions.

Now I'm facing the same problem:

Could not analyse class: maybe not loaded or no autoloader?

but I have set the autoloader correctly as always. This also happens in more than one Extension right now.. After deleting the php cache in the install tool und dump autoload and reactivating my extension, the error was gone for some time, a couple hours later its back again.. Therefore I think it must have something to do with temp files, but I can't figure out what it is exactly..

Does anyone have a solution? I have seen plenty of topics about this issue on stackoverflow, I used them in the past, but unfortunately none is working for me right now.

Important fact: This error is happening on my new server now. On my old server (with the same code in the extensions) this didn't occur and they worked fine.

Thanks in advance.

Edit: Vendornames etc. are set correctly and there are no errors in the syntax whatsoever. As I said, the extensions worked fine.

Edit2: I just found this changelog of Typo3:

https://docs.typo3.org/typo3cms/extensions/core/Changelog/8.4/Breaking-78222-ExtensionAutoloadInformationIsNowInTypo3confautoload.html

But there is no solution for the impact for none composer installations. Can someone provide one for me?

When you use composer installation and you use extensions which are not installed via composer, you need to add the autoload information in the root composer.json of your project and then run composer dump-autoload. (ext_emconf.php dont works in composer mode?)

{
    ...
    "autoload": {
        "psr-4": {
            "Vendor\\ExtensionNameA\\": "public/typo3conf/ext/extension_name_a/Classes",
            "Vendor\\ExtensionNameB\\": "public/typo3conf/ext/extension_name_b/Classes"
        }
    }
}

A possible explanation for strange timing thing "works and later not". Maybe it has something to do with the red clear cache button in the TYPO3 backend (Clear all caches). Maybe it start not working when u hit this button and cache files get cleared. Then you need to reinstall extensions to get the autoloader "temporarly" working, till the point you hit the clear all caches button again. With the solution i mentioned above, it works permanet.

Typo3: Error in ClassAliasLoader after installation/activation of an , not analyse class maybe not loaded or no autoloader?TYPO3 upgade error - 6.2 LTS to 7.6 LTSDebian 9 TYPO3 8.7.20Typo3 8.7: Could not analyse class: maybe not loaded or no autoloader? Keeps coming and going. Could not analyse class maybe not loaded or no autoloader?. Hallo zusammen, ich habe kürzlich ein Update einer bestehenden TYPO3 Installation von 6.2.31 auf 7.6.23 vorgenommen.

Have you left any configuration in your ext_tables.php?

As the TCA configuration, which is cached, is expected in Configuration/TCA/[Override/] any code in ext_tables.php might get lost.

If you want some configuration to be executed for each run you need to put it in ext_localconf.php

Could not analyse class: "Tx_Yag_Extbase_Persistence_Backend , TYPO3 7.x doesn't use any autoloader besides composer. Non-namespaced classes are not automagically loaded if the directory is not  #1289386765: Could not analyse class: "Tx_Podcast_Controller_PodcastController" maybe not loaded or no autoloader? Class Tx_Podcast_Controller_PodcastController does not exist. Ich finde über den Fehler einiges aber nichts wo zu meinem Problem passt.

Thanks for all the help, I found the solution myself now.

Actually it was not really caused by any autoloader configuration, but and old version of fpdf which apparently caused two extensions to not load their classes properly. The exception thrown was simply misleading. I have upgraded the version of fpdf and now it works properly. It is not clear to me why the same code worked a week ago and now it failed, but atleast I have found the solution to my problem.

Could not analyse class: "mPDF" maybe not loaded or no , Typo3 version 7.6.2 Core: Exception handler (WEB): Uncaught TYPO3 Exception​: #1289386765: Could not Could not analyse class: "mPDF" maybe not loaded or no autoloader? #41 This is what helped me in TYPO3 8.7. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Exception/CMS/1289386765 - TYPO3Wiki, Could not analyse class: The class cache in TYPO3 7.6 does not get cleared when pressing the "Clear System Cache" maybe not loaded or no autoloader? Go to the Extension Manager and uninstall your extension - Go to the Install (​https://fluidtypo3.org/blog/news/coming-changes-in-flux-72.html). #1289386765: Could not analyse class:Tx_Userzaehlen_Controller_ZaehlenController maybe not loaded or no autoloader? Einen Autoloader brauche ich aber laut meinen Infos nur dann, wenn ich von der normalen Schreibweise abweiche.

Could not analyse class, [Frage] Could not analyse class - maybe not loaded or no autoloader? TYPO3-​Version: 8.7.1 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::​addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'PUSHY SITE  General. The class cache in TYPO3 7.6 does not get cleared when pressing the "Clear System Cache" button, so you have to empty typo3temp/* yourself to get around this issue:

Bug listing with status RESOLVED with resolution UPSTREAM as at , does not return valid battery info" status:RESOLVED resolution:UPSTREAM Bug:41672 - "non-root user warning for splat not helpful" status:RESOLVED segfaults when attempting to change the name of a class (bug in wxPython?) doesn't retest used line endings and simply keeps using the originally loaded one"  To clarify things: We are talking CMS v8 here. So we do not need any autoloading information in emconf at all. (same as CMS v7) It does not matter how you install TYPO3 (composer based or not). As far as I can tell the extension_builder composer.json is perfectly fine.

Comments
  • I didn't use the composer installation in the first place. Therefore I added the psr4 autoloader in the emconf.php to make it permanent. That worked in the same Typo3 8.7 environment on my old server. Now it doesn't work on the new server. Code didn't change.
  • Oh ok, i thought you are using composer installation, becouse you wrote: "... dump autoload...". Then my answer is not usefull at all :D
  • Did you check the files inside folder /typo3conf/autoload/ ? there should be some autoload_*.php files which maps your namespaces. Maybe its write permissions problem? (which dont explains that it works for a short time). hmmm
  • thanks for your help, I have added an answer to my question with the solution. It was something else that lead to the error.
  • I have all my TCA files and their configuration inside Configuration/TCA/.. names are tx_myExtKey_domain_model_nameOfModel.php. In my ext_tables.php file are no configurations.