mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

Could not analyse class: "mPDF" maybe not loaded or no autoloader? #41

Closed brianhauge closed 8 years ago

brianhauge commented 8 years ago

Typo3 version 7.6.2

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1289386765: Could not analyse class: "mPDF" maybe not loaded or no autoloader? | TYPO3\CMS\Extbase\Object\Container\Exception\UnknownObjectException thrown in file /var/www/haugemedia.net/public_html/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php in line 37. Requested URL: http://brianhauge.dk/?tx_web2pdf_pi1%5Bargument%5D=printPage&cHash=5ac8167ac70f23efe4112e4ba3970b02

More info possibly available on: https://wiki.typo3.org/Exception/CMS/1289386765

kpurrmann commented 8 years ago

It seems that something went wrong with your autoloader. Just installed web2pdf in a new instance of TYPO3 7.6.2 via composer. Everything looks fine.

Another project had the same issue and we found out that the autoloader was not initialized the correct way. May you try to run composer install or composer update on your server again.

brianhauge commented 8 years ago

Hi,

I didn't install it via the composer, installed it via TER. Shouldn't that work too?

I already tried and to reinstall it as well as clearing all content of typo3temp/

Mvh Brian Den 14/01/2016 11.54 skrev "Kevin Purrmann" notifications@github.com:

It seems that something went wrong with your autoloader. Just installed web2pdf in a new instance of TYPO3 7.6.2 via composer. Everything looks fine.

Another project had the same issue and we found out that the autoloader was not initialized the correct way. May you try to run composer install or composer update on your server again.

— Reply to this email directly or view it on GitHub https://github.com/mittwald/typo3-web2pdf/issues/41#issuecomment-171611497 .

brianhauge commented 8 years ago

And the source I did not use composer either.

Mvh Brian Den 14/01/2016 14.12 skrev "Brian Hauge Hansen" brian.hauge@gmail.com:

Hi,

I didn't install it via the composer, installed it via TER. Shouldn't that work too?

I already tried and to reinstall it as well as clearing all content of typo3temp/

Mvh Brian Den 14/01/2016 11.54 skrev "Kevin Purrmann" notifications@github.com:

It seems that something went wrong with your autoloader. Just installed web2pdf in a new instance of TYPO3 7.6.2 via composer. Everything looks fine.

Another project had the same issue and we found out that the autoloader was not initialized the correct way. May you try to run composer install or composer update on your server again.

— Reply to this email directly or view it on GitHub https://github.com/mittwald/typo3-web2pdf/issues/41#issuecomment-171611497 .

izzycole commented 8 years ago

Same problem here :( Typo3 7.6.2, no composer used

izzycole commented 8 years ago

Thanks!

martin-helmich commented 8 years ago

Fixed in v1.1.4, should be in TER shortly.

pstranghoener commented 8 years ago

Uploaded to TER

mediatack commented 8 years ago

With v1.1.4 and the changes in composer.json i get an depency error in TYPO3 6.2 when installing the extension over backend extension manager.

Oops, an error occurred! The package "web2pdf" depends on "mpdf/mpdf" which is not present in the system.

I never used composer for installing extensions or TYPO3 itself so i don't know why TYPO3 looks into this file at all. Are there any depencies which the server has to fulfill? Wiki (https://wiki.typo3.org/Composer) says "However even since TYPO3 6.2.10 it is possible to have classes of all composer packages available if the TYPO3_COMPOSER_AUTOLOAD environment variable is set in your web server" but this variable is definitely not set.

nannione commented 8 years ago

same issue as mediatack:

The package "web2pdf" depends on "mpdf/mpdf" which is not present in the system.

fnagel commented 8 years ago

Same issue here but when downloaded using composer ("typo3-ter/web2pdf": "1.1.4" in require) and TYPO3 6.2.17. I was able to get everything to work by just enabling the extension in the PackageStates file manually -- so the autoloading seems to work at least. Seems this more of a meta data / composer / EM issue.

Perhaps this is somewhat helpful: https://gist.github.com/cedricziel/08ea469db5197e24552c

christophlehmann commented 8 years ago

With 1.1.4 in TYPO3 6.2 i try to install the extension and get the Error

The package "web2pdf" depends on "mpdf/mpdf" which is not present in the system.

christophlehmann commented 8 years ago

Workaround in TYPO3 6.2.21: When i remove the composer.json + composer.lock it's possible to install the extension and it works as expected in a non-composer installation

mgante commented 7 years ago

Still having a problem with TYPO3 7.6.11 and web2pdf 1.1.4:

1289386765: Could not analyse class: "mPDF" maybe not loaded or no autoloader? PHP Runtime Deprecation Notice: Methods with the same name as their class will not be constructors in a future version of PHP; mPDF has a deprecated constructor in /html/typo3/typo3conf/ext/web2pdf/Vendor/mpdf/mpdf/mpdf.php line 89

Maybe a PHP 7 and mPDF 6.0 issue? (We are using PHP 7.0.9)

SicorDev commented 5 years ago

This is what helped me in TYPO3 8.7

Installed the extension "mpdf" and tried it again ;)