En fait, depuis ce message je me suis rendu compte que les pdf ne se génèrent plus correctement,
Je reviens donc en arrière ...
j'ai donc essayé de débuger le code du template et l'ai réduit au minimum.
{$ID = $smarty.get.id} {$ID}
{loop type="product" name="my_product_loop" id="{$ID}" order="min_price"}
<h2>{$TITLE} - {$CHAPO nofilter}</h2>
{loop type="image" name="imgpdf" product={$ID} width="560" height="445" resize_mode="borders" limit="1"}
<img src="{$IMAGE_URL nofilter}">
{/loop}
{/loop}
L'affichage d'un pdf se fait correctement tant qu'on ne cherche pas à afficher une image.
Dans les logs, je reçois :
124: ERROR [GeneratorController.php:renderPdfTemplate()] {64} 2022-11-25 12:33:13:error during generating PDF document plant-card.html with message "Unable to get the size of the image []"
125: ERROR [GeneratorController.php:renderPdfTemplate()] {64} 2022-11-25 11:47:40:error during generating PDF document plant-card.html with message "Unable to get the size of the image [https://www.en.grainedevie.net/cache/images/product/eb1b0b46dcc4868d2bd0e25e881ca278-buddleja-officinalis_resize.jpg-1263.jpg]"
126: ERROR [ErrorListener.php:logException()] {111} 2022-11-25 11:47:40:Uncaught exceptionWe're sorry, this PDF document 509 is not available at the moment.
Stack Trace: #0 /home/../../local/modules/PdfGenerator/Controller/GeneratorController.php(29): PdfGenerator\Controller\GeneratorController->renderPdfTemplate('plant-card', '509', false)
#1 /home/../../core/vendor/symfony/http-kernel/HttpKernel.php(135): PdfGenerator\Controller\GeneratorController->downloadPdf('plant-card', '509')
#2 /home/../../core/vendor/symfony/http-kernel/HttpKernel.php(57): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Thelia\Core\HttpFoundation\Request), 1)
#3 /home/../../core/lib/Thelia/Core/TheliaHttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#4 /home/../../local/modules/BackOfficePath/Stack/BackOfficePathMiddleware.php(106): Thelia\Core\TheliaHttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#5 /home/../../core/lib/Thelia/Core/Stack/ParamInitMiddleware.php(87): BackOfficePath\Stack\BackOfficePathMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#6 /home/../../core/lib/Thelia/Core/Stack/SessionMiddleware.php(80): Thelia\Core\Stack\ParamInitMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#7 /home/../../core/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Thelia\Core\Stack\SessionMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#8 /home/../../core/vendor/symfony/http-kernel/Kernel.php(183): Stack\StackedHttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#9 /home/../../web/index_dev.php(46): Symfony\Component\HttpKernel\Kernel->handle(Object(Thelia\Core\HttpFoundation\Request))
#10 {main}
Last edited by vz777 (26-11-2022 09:32:49)