Error when calling /fillpdf?fid=x&entity_id=x

Created on 19 June 2023, about 1 year ago
Updated 21 June 2023, about 1 year ago

I called http://www.websitename.com/fillpdf?fid=4&entity_id=3 where the form id is 4 and the node id is 3 and I get this error set.

The website encountered an unexpected error. Please try again later.

Error: Call to undefined function Drupal\fillpdf\Plugin\PdfBackend\passthru() in Drupal\fillpdf\Plugin\PdfBackend\PdftkPdfBackend->mergeFile() (line 221 of modules/contrib/fillpdf/src/Plugin/PdfBackend/PdftkPdfBackend.php).

Drupal\fillpdf\Service\BackendProxy->merge(Object, Array, Array) (Line: 198)
Drupal\fillpdf\Controller\HandlePdfController->populatePdf()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 686)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
πŸ› Bug report
Status

Closed: works as designed

Version

5.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jo1ene

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jo1ene
  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    I don't know why passthru() wouldn't exist. Try adding a backslash before the call, like this:

    \passthru($command);
    

    That will guarantee that PHP will look for the root passthru().

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jo1ene

    I'm sorry. I don't know enough about php and running my own server to recognize this as the same problem with exec(); Hopefully this issue will help someone else.

    The pdf generated is awesome!

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦
Production build 0.69.0 2024