DMAGmbH / dma_elementgenerator

DMA Elementgenerator (Contao)
45 stars 17 forks source link

Argument 1 passed to Contao\Image::__construct() must be an instance of Contao\File, null given, called in Image.php #76

Closed morhai closed 9 years ago

morhai commented 9 years ago

Hallo,

folgender Fehler trat bei mir nach einem Update von 3.3.6 auf 3.4.0 auf. Version DMA: 1.0.0.9004 Es betrifft den Feldtyp Bild. Sobald der Feldtyp nicht mehr benutzt wird tritt der Fehler nicht mehr auf.

Anscheinend verlangt Image.php nun eine andere Übergabe. Leider kenne ich mich nicht genug aus um weitere Mutmaßungen zu treffen.

[13-Dec-2014 21:26:26 Europe/Berlin] PHP Recoverable error: Argument 1 passed to Contao\Image::__construct() must be an instance of Contao\File, null given, called in /system/modules/core/library/Contao/Image.php on line 862 and defined in /system/modules/core/library/Contao/Image.php on line 109

0 /system/modules/core/library/Contao/Image.php(109): __error(4096, 'Argument 1 pass...', '/var/www/vhosts...', 109, Array)

1 /system/modules/core/library/Contao/Image.php(862): Contao\Image->__construct(NULL)

2 /system/modules/core/library/Contao/Controller.php(2595): Contao\Image::create(NULL, NULL)

3 /system/modules/dma_elementgenerator/DMAElementGenerator.php(605): Contao\Controller::addImageToTemplate(Object(Contao\FrontendTemplate), Array)

4 /system/modules/dma_elementgenerator/DMAElementGenerator.php(48): DMAElementGenerator->compile(Object(DMAElementGeneratorContent))

5 /system/modules/dma_elementgenerator/DMAElementGeneratorContent.php(47): DMAElementGenerator->generate(Object(DMAElementGeneratorContent))

6 /system/modules/core/elements/ContentElement.php(174): DMAElementGeneratorContent->compile()

7 /system/modules/core/library/Contao/Controller.php(473): Contao\ContentElement->generate()

8 /system/modules/core/modules/ModuleArticle.php(196): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')

9 /system/modules/core/modules/Module.php(163): Contao\ModuleArticle->compile()

10 /system/modules/core/modules/ModuleArticle.php(59): Contao\Module->generate()

11 /system/modules/core/library/Contao/Controller.php(409): Contao\ModuleArticle->generate(true)

12 /system/modules/core/elements/ContentArticle.php(37): Contao\Controller::getArticle('66', false, true)

13 /system/modules/core/library/Contao/Controller.php(473): Contao\ContentArticle->generate()

14 /system/modules/core/modules/ModuleArticle.php(196): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'right')

15 /system/modules/core/modules/Module.php(163): Contao\ModuleArticle->compile()

16 /system/modules/core/modules/ModuleArticle.php(59): Contao\Module->generate()

17 /system/modules/core/library/Contao/Controller.php(409): Contao\ModuleArticle->generate(false)

18 /system/modules/core/library/Contao/Controller.php(273): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'right')

19 /system/modules/core/pages/PageRegular.php(138): Contao\Controller::getFrontendModule('0', 'right')

20 /system/modules/core/controllers/FrontendIndex.php(253): Contao\PageRegular->generate(Object(Contao\PageModel), true)

21 /index.php(22): Contao\FrontendIndex->run()

22 {main}

JanoschSkuplik commented 9 years ago

Gucke ich mir an. Scheinbar wurde da nichts übergeben ;)

sitting-bull commented 9 years ago

Den Bug von morhai kann ich bestätigen. Ich bräuchte das Feature auch dringend wieder.

Gibt es da eventuell schon einen workaround?

JanoschSkuplik commented 9 years ago

Hallo zusammen, ich habe hier gerade einmal mit einer frischen Installation nachgesehen. Ich erhalte den Fehler nicht. Besteht evtl. die Möglichkeit einmal Zugriff auf eine der bestehenden Installationen zu erhalten?

sitting-bull commented 9 years ago

Super, klappt perfekt. Danke für das schnelle Debugging!

JanoschSkuplik commented 9 years ago

Danke an @morhai für die Testumgebung.