Error
Call to a member function images() on boolean Error thrown with message "Call to a member function images() on boolean" Stacktrace: #8 Error in /kunden/328402_1030/webpage/_live/site/templates/pdf.php:24 #7 require in /kunden/328402_1030/webpage/_live/php/xberg/Kirby/View/View.php:114 #6 Xberg\Kirby\View\View:capture in /kunden/328402_1030/webpage/_live/php/xberg/Kirby/View/View.php:95 #5 Xberg\Kirby\View\View:render in /kunden/328402_1030/webpage/_live/php/xberg/Kirby/Component/Template.php:73 #4 Xberg\Kirby\Component\Template:render in /kunden/328402_1030/webpage/_live/kirby/kirby.php:681 #3 Kirby:template in /kunden/328402_1030/webpage/_live/kirby/kirby.php:669 #2 Kirby:render in /kunden/328402_1030/webpage/_live/kirby/kirby/component/response.php:29 #1 Kirby\Component\Response:make in /kunden/328402_1030/webpage/_live/kirby/kirby.php:751 #0 Kirby:launch in /kunden/328402_1030/webpage/_live/index.php:16
Stack frames (9)
8
Error
/kunden/328402_1030/webpage/_live/site/templates/pdf.php24
7
require
/xberg/Kirby/View/View.php114
6
Xberg\Kirby\View\View capture
/xberg/Kirby/View/View.php95
5
Xberg\Kirby\View\View render
/xberg/Kirby/Component/Template.php73
4
Xberg\Kirby\Component\Template render
/kunden/328402_1030/webpage/_live/kirby/kirby.php681
3
Kirby template
/kunden/328402_1030/webpage/_live/kirby/kirby.php669
2
Kirby render
/kunden/328402_1030/webpage/_live/kirby/kirby/component/response.php29
1
Kirby\Component\Response make
/kunden/328402_1030/webpage/_live/kirby/kirby.php751
0
Kirby launch
/kunden/328402_1030/webpage/_live/index.php16
/kunden/328402_1030/webpage/_live/site/templates/pdf.php
$workingpage = page(r::get('path'));
$pdfpage = page('pdf');
$pdftemplate = $pdfpage->documents()->first();
$pdftemplate_path = $pdftemplate->dir().'/'.$pdftemplate->filename();
$pdf = new Fpdi();
 
$lineHeight = 5;
 
$pdf->setSourceFile($pdftemplate_path);
$pdf->AddPage();
 
$pdf->SetDrawColor(255, 255, 255);
$pdf->SetFillColor(255, 255, 255);
$pdf->Rect( 5, 9, 195, 2, 'F', [], [255, 255, 255]);
$pdf->Rect( 5, 295, 195, 10, 'F', [], [255, 255, 255]);
 
$pdf->useTemplate($pdf->importPage(1), 0, 0);
$pdf->setPageMark();
 
$image = $workingpage->images()->nth('1');
if ($image) {
    $pdf->Image($this->thumbUrl($image, 1600, 1200, 90, 'centered'), 20.9, 33, 169);
}
 
$pdf->SetFontSize(9);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(20, 170);
$pdf->SetMargins(20, 20, 20, true);
 
$pdf->Write($lineHeight, str_replace('—', '-', $workingpage->text()));
$pdf->Write($lineHeight, "\n\n");
 
$additonalContent = [];
$partnerContent = snippet('partner-pdf', ['page' => $workingpage], true);
if (strlen(trim($partnerContent)) > 0) {
    $additonalContent = ['Partner' => $partnerContent];
}
if ($workingpage->pdf_p_leader() && !$workingpage->pdf_p_leader()->empty()) {
    $additonalContent['Projektleiter'] = $workingpage->pdf_p_leader()->value();
 
Arguments
  1. "Call to a member function images() on boolean"
    
/kunden/328402_1030/webpage/_live/php/xberg/Kirby/View/View.php
        $output = $this->capture($name, $data);
        if ($capture) {
            return $output;
        }
        echo $output;
    }
 
 
    public function capture(string $name, array $data = [])
    {
        $this->localScopeStack[] = [
            'name' => $name,
            'data' => array_replace($this->defaultData, $data),
            'wrapLevel' => count($this->wrappersStack)
        ];
        ob_start();
        unset($name);
        unset($data);
        extract($this->localScopeStack[count($this->localScopeStack) - 1]['data']);
        $output = require($this->getTemplate($this->localScopeStack[count($this->localScopeStack) - 1]['name']));
        $wrapLevel = array_pop($this->localScopeStack)['wrapLevel'];
        $output = ($output !== 1 ? $output : ob_get_contents());
        ob_end_clean();
 
        while (count($this->wrappersStack) > $wrapLevel) {
            $wrapEntry = array_pop($this->wrappersStack);
            $wrapName = $wrapEntry['name'];
            $wrapData = $wrapEntry['data'];
            $wrapData[$wrapEntry['contentName']] = $output;
            $output = $this->capture($wrapName, $wrapData);
        }
        return $output;
    }
 
 
    public function wrap(string $name, array $data = [], $contentName = 'content')
    {
        $this->wrappersStack[] = [
            'name' => $name,
            'data' => $data,
/kunden/328402_1030/webpage/_live/php/xberg/Kirby/View/View.php
    }
 
 
    public function setDefaultVar(string $name, $value)
    {
        $this->defaultData[$name] = $value;
        return $this;
    }
 
 
    public function resetDefaultVar(string $name)
    {
        unset($this->defaultData[$name]);
        return $this;
    }
 
 
    public function render(string $name, array $data = [], $capture = false)
    {
        $output = $this->capture($name, $data);
        if ($capture) {
            return $output;
        }
        echo $output;
    }
 
 
    public function capture(string $name, array $data = [])
    {
        $this->localScopeStack[] = [
            'name' => $name,
            'data' => array_replace($this->defaultData, $data),
            'wrapLevel' => count($this->wrappersStack)
        ];
        ob_start();
        unset($name);
        unset($data);
        extract($this->localScopeStack[count($this->localScopeStack) - 1]['data']);
        $output = require($this->getTemplate($this->localScopeStack[count($this->localScopeStack) - 1]['name']));
        $wrapLevel = array_pop($this->localScopeStack)['wrapLevel'];
Arguments
  1. null
    
  2. null
    
/kunden/328402_1030/webpage/_live/php/xberg/Kirby/Component/Template.php
 
            $this->view->setDefaultData($data);
        }
 
        // apply the basic template vars
        return $data;
    }
 
 
    public function render($template, $data = [], $return = true)
    {
        if($template instanceof Page) {
            $data = $this->data($template, $data);
            $path = $template->templateFile();
        } else {
            $data = $this->data(null, $data);
            $path = $template;
        }
 
        return $this->view->render($path, $data, $return);
    }
 
}
 
Arguments
  1. "/kunden/328402_1030/webpage/_live/site/templates/pdf.php"
    
  2. array:3 [
      "site" => Site {}
      "pages" => Children {}
      "page" => Page {}
    ]
    
  3. true
    
/kunden/328402_1030/webpage/_live/kirby/kirby.php
      }
 
      return $template;
 
    }
 
    // return a fresh template
    return $this->template($page, $data);
 
  }
 
  /**
   * Template configuration
   *
   * @param Page $page
   * @param array $data
   * @return string
   */
  public function template(Page $page, $data = array()) {
    return $this->component('template')->render($page, $data);
  }
 
  public function request() {
    if(!is_null($this->request)) return $this->request;
    return $this->request = new Request($this);
  }
 
  public function router() {
    return $this->router;
  }
 
  public function route() {
    return $this->route;
  }
 
  /**
   * Starts the router, renders the page and returns the response
   *
   * @return mixed
   */
Arguments
  1. Page {}
    
  2. array:3 [
      "site" => Site {}
      "pages" => Children {}
      "page" => Page {}
    ]
    
/kunden/328402_1030/webpage/_live/kirby/kirby.php
        }
 
      }
 
      // try to fetch the template from cache
      $template = $this->cache()->get($cacheId);
 
      // fetch fresh content if the cache is empty
      if(empty($template)) {
        $template = $this->template($page, $data);
        // store the result for the next round
        $this->cache()->set($cacheId, $template);
      }
 
      return $template;
 
    }
 
    // return a fresh template
    return $this->template($page, $data);
 
  }
 
  /**
   * Template configuration
   *
   * @param Page $page
   * @param array $data
   * @return string
   */
  public function template(Page $page, $data = array()) {
    return $this->component('template')->render($page, $data);
  }
 
  public function request() {
    if(!is_null($this->request)) return $this->request;
    return $this->request = new Request($this);
  }
 
  public function router() {
Arguments
  1. Page {}
    
  2. []
    
/kunden/328402_1030/webpage/_live/kirby/kirby/component/response.php
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://getkirby.com/license
 */
class Response extends \Kirby\Component {
 
  /**
   * Builds and return the response by various input
   * 
   * @param mixed $response
   * @return mixed
   */
  public function make($response) {
 
    if(is_string($response)) {
      return $this->kirby->render(page($response));
    } else if(is_array($response)) {
      return $this->kirby->render(page($response[0]), $response[1]);
    } else if(is_a($response, 'Page')) {
      return $this->kirby->render($response);      
    } else if(is_a($response, 'Response')) {
      return $response;
    } else {
      return null;
    }
 
  }
 
}
Arguments
  1. Page {}
    
/kunden/328402_1030/webpage/_live/kirby/kirby.php
    // check for a valid route
    if(is_null($this->route)) {
      header::status('500');
      header::type('json');
      die(json_encode(array(
        'status'  => 'error',
        'message' => 'Invalid route or request method'
      )));
    }
 
    // call the router action with all arguments from the pattern
    $response = call($this->route->action(), $this->route->arguments());
 
    // load all language variables
    // this can only be loaded once the router action has been called
    // otherwise the current language is not yet available
    $this->localize();
 
    // build the response
    $this->response = $this->component('response')->make($response);
 
    // store the current language in the session
    if(
        $this->option('language.detect') &&
        $this->site()->multilang() &&
        $this->site()->language()
      ) {
      s::set('kirby_language', $this->site()->language()->code());
    }
 
    return $this->response;
 
  }
 
  /**
   * Register a new hook
   *
   * @param string/array $hook The name of the hook
   * @param closure $callback
   */
Arguments
  1. Page {}
    
/kunden/328402_1030/webpage/_live/index.php
<?php
 
define('DS', DIRECTORY_SEPARATOR);
 
// load kirby
require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php');
 
// check for a custom site.php
if(file_exists(__DIR__ . DS . 'site.php')) {
  require(__DIR__ . DS . 'site.php');
} else {
  $kirby = kirby();
}
 
// render
echo $kirby->launch();
 

Environment & details:

Key Value
Kirby Toolkit
"v2.5.12"
Kirby CMS
"v2.5.12"
Key Value
page
"de/pdf"
path
"baukunst/projekte/staedtebau/hoefe-holte-stukenbrock"
empty
empty
empty
empty
Key Value
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ISPMADDR
"WU9BWE9eS1hDS15qRVheRE9YB0VYXkRPWARJRUc="
TEMP
"/temp/328402/re910912/ortner-ortner.com"
TMPDIR
"/temp/328402/re910912/ortner-ortner.com"
USER
"re910912"
HOME
"/kunden/328402_1030/webpage"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/de/pdf?path=baukunst/projekte/staedtebau/hoefe-holte-stukenbrock"
QUERY_STRING
"page=de/pdf&path=baukunst/projekte/staedtebau/hoefe-holte-stukenbrock"
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_QUERY_STRING
"page=de/pdf&path=baukunst/projekte/staedtebau/hoefe-holte-stukenbrock"
REDIRECT_URL
"/de/pdf"
REMOTE_PORT
"42958"
SCRIPT_FILENAME
"/kunden/328402_1030/webpage/_live/index.php"
SERVER_ADMIN
"webmaster@ortner-ortner.com"
CONTEXT_DOCUMENT_ROOT
"/kunden/328402_1030/webpage/_live"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"https"
DOCUMENT_ROOT
"/kunden/328402_1030/webpage/_live/"
REMOTE_ADDR
"3.238.62.124"
SERVER_PORT
"443"
SERVER_ADDR
"172.27.0.13"
SERVER_NAME
"ortner-ortner.com"
SERVER_SOFTWARE
"Apache"
SERVER_SIGNATURE
""
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_CONNECTION
"close"
HTTP_RANGE
"bytes=0-5242879"
HTTP_X_FORWARDED_FROM
"3.238.62.124"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_HOST
"ortner-ortner.com"
proxy-nokeepalive
"1"
PHPEdition
"7-2"
DFSERVER_ALIAS
"ortner-ortner.com"
DFLIMITPROC
"0"
DFLIMITCPU
"60"
DFLIMITMEM
"256000"
DFCANCGI
"1"
PHPVersion
"7-2-FCGI"
DFCATCHALLSTATUS
"FALSE"
DFDNUMBER
"1421438"
DFUID
"99999"
UNIQUE_ID
"ZgWq7CHVJYvCLIarvbMgGwAAAAE"
HTTPS
"on"
REDIRECT_STATUS
"200"
REDIRECT_PHPEdition
"7-2"
REDIRECT_DFSERVER_ALIAS
"ortner-ortner.com"
REDIRECT_DFLIMITPROC
"0"
REDIRECT_DFLIMITCPU
"60"
REDIRECT_DFLIMITMEM
"256000"
REDIRECT_DFCANCGI
"1"
REDIRECT_PHPVersion
"7-2-FCGI"
REDIRECT_DFCATCHALLSTATUS
"FALSE"
REDIRECT_DFDNUMBER
"1421438"
REDIRECT_DFUID
"99999"
REDIRECT_UNIQUE_ID
"ZgWq7CHVJYvCLIarvbMgGwAAAAE"
REDIRECT_HTTPS
"on"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711647468,4472
REQUEST_TIME
1711647468
empty
0. Whoops\Handler\PrettyPageHandler