Hello again,
This is a follow-up to this forum post. For testing purposes, I initially tried using an empty template, which worked after the issue was resolved here: GitHub issue #10049. However, when I attempted to use the officially published TD4 delivery note template from this link, the process once again got stuck at “Processing.”
I am using the self-hosted version v5.10.30 in a Docker environment. I can replicate the issue on both demo sites (Invoice Ninja Demo and React Invoicing Demo), and the same problem occurs when using the latest macOS desktop application.
Bug Description
Steps to Reproduce:
1. I created a new custom design template for quotes and invoices.
2. I copied the content from the TD4 delivery note template and pasted it into the body section.
3. After saving the template, I selected an existing quote, clicked on “More Actions” > “Run Template,” chose the newly created custom design, and clicked “Run Template.”
However, the process remains stuck with the status “Processing.”
Expected Behavior:
The generated PDF should be available for download.
Screenshots:
Here is the POST request when attempting to run the template in the browser on my self-hosted instance:
Logs
[2024-10-10 21:54:45] production.ERROR: The "filter" filter expects a sequence/mapping or "Traversable", got "NULL" in "__string_template__5cf1f08e78412d6ead28072dd88777bb" at line 14. {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): The \"filter\" filter expects a sequence/mapping or \"Traversable\", got \"NULL\" in \"__string_template__5cf1f08e78412d6ead28072dd88777bb\" at line 14. at /var/www/app/vendor/twig/twig/src/Extension/CoreExtension.php:1801)
[stacktrace]
#0 /var/www/app/vendor/twig/twig/src/Environment.php(391) : eval()'d code(63): Twig\\Extension\\CoreExtension::filter(Object(Twig\\Environment), NULL, Object(Closure))
#1 /var/www/app/vendor/twig/twig/src/Template.php(393): __TwigTemplate_371acc31b9e64f8094df6d35532964bd->doDisplay(Array, Array)
#2 /var/www/app/vendor/twig/twig/src/Template.php(349): Twig\\Template->yield(Array, Array)
#3 /var/www/app/vendor/twig/twig/src/Template.php(364): Twig\\Template->display(Array)
#4 /var/www/app/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\\Template->render(Array)
#5 /var/www/app/app/Services/Template/TemplateService.php(324): Twig\\TemplateWrapper->render(Array)
#6 /var/www/app/app/Services/Template/TemplateService.php(150): App\\Services\\Template\\TemplateService->parseNinjaBlocks()
#7 /var/www/app/app/Services/Template/TemplateAction.php(167): App\\Services\\Template\\TemplateService->build(Array)
#8 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Services\\Template\\TemplateAction->handle()
#9 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#10 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#11 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#12 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#13 /var/www/app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call(Array)
#14 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(App\\Services\\Template\\TemplateAction))
#15 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Services\\Template\\TemplateAction))
#16 /var/www/app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#17 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(App\\Services\\Template\\TemplateAction), false)
#18 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}(Object(App\\Services\\Template\\TemplateAction))
#19 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Middleware/WithoutOverlapping.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Services\\Template\\TemplateAction))
#20 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Queue\\Middleware\\WithoutOverlapping->handle(Object(App\\Services\\Template\\TemplateAction), Object(Closure))
#21 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Services\\Template\\TemplateAction))
#22 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#23 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Object(App\\Services\\Template\\TemplateAction))
#24 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Array)
#25 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(440): Illuminate\\Queue\\Jobs\\Job->fire()
#26 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(390): Illuminate\\Queue\\Worker->process('database', Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Object(Illuminate\\Queue\\WorkerOptions))
#27 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(177): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), 'database', Object(Illuminate\\Queue\\WorkerOptions))
#28 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(139): Illuminate\\Queue\\Worker->daemon('database', 'default', Object(Illuminate\\Queue\\WorkerOptions))
#29 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(122): Illuminate\\Queue\\Console\\WorkCommand->runWorker('database', 'default')
#30 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#31 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#32 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#33 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#34 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#35 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call(Array)
#36 /var/www/app/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#37 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#38 /var/www/app/vendor/symfony/console/Application.php(1047): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#39 /var/www/app/vendor/symfony/console/Application.php(316): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))