Bug #21506
closedautoloader doesn't support ext_autoload from extensions having underscore in extkey
0%
Description
If this is the case, the function
t3lib_autoloader::attemptToLoadRegistryForGivenClassName
fails with calculating extkey because it explodes with '_'
(issue imported from #M12519)
Updated by Francois Suter about 15 years ago
I just checked and - in fact - it works.
I used your extension reports_logview to check, since this is what led you to report this problem and went through the details of t3lib_autoloader with it.
The problem is that the class name of your reports class doesn't follow proper naming conventions. You called it:
tx_Reports_Logview
but since your extension is called "report_logview", your class should have been named something like:
tx_reportslogview_foobar
So if I rename your class to:
tx_reportslogview_Logview
and enter the following in the ext_autoload.php file:
'tx_reportslogview_logview' => $extensionPath . 'class.tx_reports_logview.php',
then change the ext_tables.php file accordingly:
'report' => 'tx_reportslogview_Logview'
It all works fine.
NOTE: the class name in the ext_autoload.php file must be all lowercase. I'm not totally happy with that, but it seems like most people are, see discussion "TYPO3 autoloader case sensitivity: your opinion please" in the typo3.projects.typo3_4-3.general mailing list.
Updated by Oliver Hader about 15 years ago
Thanks Fracois for testing this issue. If lowercase is a problem, we could add another strtolowercase() for processing/loading these registry files.
Updated by Oliver Hader about 15 years ago
Steffen, since this seems not to be a bug, could you please close this issue again? Thanks in advance!
Updated by Steffen Kamper about 15 years ago
i'll do, i first will test it too, thx.
Updated by Steffen Kamper about 15 years ago
I tested and yes, it works. Thanks Francois for investigating.
I really would like to add the strtolowercase because it's weird having class name
tx_reportslogview_Logview
and in autoload you need to declare it as
tx_reportslogview_logview
I will make new RFC for it.