Error
Call to a member function url() on null Error thrown with message "Call to a member function url() on null" Stacktrace: #7 Error in /home/dh_wsdvbk/masonstudio.com/site/templates/project.php:123 #6 require in /home/dh_wsdvbk/masonstudio.com/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #5 Tpl:load in /home/dh_wsdvbk/masonstudio.com/kirby/kirby/component/template.php:103 #4 Kirby\Component\Template:render in /home/dh_wsdvbk/masonstudio.com/kirby/kirby.php:681 #3 Kirby:template in /home/dh_wsdvbk/masonstudio.com/kirby/kirby.php:659 #2 Kirby:render in /home/dh_wsdvbk/masonstudio.com/kirby/kirby/component/response.php:29 #1 Kirby\Component\Response:make in /home/dh_wsdvbk/masonstudio.com/kirby/kirby.php:751 #0 Kirby:launch in /home/dh_wsdvbk/masonstudio.com/index.php:16
Stack frames (8)
7
Error
/
home
/
dh_wsdvbk
/
masonstudio.com
/
site
/
templates
/
project.php
123
6
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
5
Tpl
load
/
kirby
/
component
/
template.php
103
4
Kirby
\
Component
\
Template
render
/
kirby.php
681
3
Kirby
template
/
kirby.php
659
2
Kirby
render
/
kirby
/
component
/
response.php
29
1
Kirby
\
Component
\
Response
make
/
kirby.php
751
0
Kirby
launch
/
home
/
dh_wsdvbk
/
masonstudio.com
/
index.php
16
/
home
/
dh_wsdvbk
/
masonstudio.com
/
site
/
templates
/
project.php
    <a href="<?php echo $page->parent()->children()->visible()->first()->url() ?>" class="smoothTransition">
        <div class="next">
            <div class="projectThumbnail">
                <?php echo thumb($page->parent()->children()->visible()->first()->images()->find($page->parent()->children()->visible()->first()->primaryimg()), array('width' => 300)); ?>
            </div>
            <div class="arrow">
                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="18px" height="33px" viewBox="0 0 18 33" enable-background="new 0 0 18 33" xml:space="preserve">
<polygon points="16.6,32.8 0.3,16.5 16.6,0.2 17.3,0.9 1.8,16.5 17.3,32.1"/>
</svg>
            </div>
            <div class="textBlock">
                <div class="text">
                    <h4>Next Project</h4>
                    <p><?php echo $page->parent()->children()->visible()->first()->title() ?></p>                
                </div>
            </div>
        </div>        
    </a>
    <?php } else { ?>
    <a href="<?php echo $page->nextVisible()->url() ?>" class="smoothTransition">
        <div class="next">
            <div class="projectThumbnail">
                <?php echo thumb($page->nextVisible()->images()->find($page->nextVisible()->primaryimg()), array('width' => 300)); ?>
            </div>
            <div class="arrow">
                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="18px" height="33px" viewBox="0 0 18 33" enable-background="new 0 0 18 33" xml:space="preserve">
<polygon points="16.6,32.8 0.3,16.5 16.6,0.2 17.3,0.9 1.8,16.5 17.3,32.1"/>
</svg>
            </div>
            <div class="textBlock">
                <div class="text">
                    <h4>Next Project</h4>
                    <p><?php echo $page->nextVisible()->title() ?></p>                
                </div>
            </div>
        </div>        
    </a>
    <?php } ?>
</div>
 
/
home
/
dh_wsdvbk
/
masonstudio.com
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
/**
 * Tpl
 *
 * Super simple template engine
 *
 * @package   Kirby Toolkit
 * @author    Bastian Allgeier <bastian@getkirby.com>
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */
class Tpl extends Silo {
 
  public static $data = array();
 
  public static function load($_file, $_data = array(), $_return = true) {
    if(!file_exists($_file)) return false;
    ob_start();
    extract(array_merge(static::$data, (array)$_data));
    require($_file);
    $_content = ob_get_contents();
    ob_end_clean();
    if($_return) return $_content;
    echo $_content;
  }
 
}
/
home
/
dh_wsdvbk
/
masonstudio.com
/
kirby
/
kirby
/
component
/
template.php
    if($template instanceof Page) {
      $page = $template;
      $file = $page->templateFile();
      $data = $this->data($page, $data);
    } else {
      $file = $template;
      $data = $this->data(null, $data);
    }
 
    // check for an existing template
    if(!file_exists($file)) {
      throw new Exception('The template could not be found');
    }
 
    // merge and register the template data globally
    $tplData = tpl::$data;
    tpl::$data = array_merge(tpl::$data, $data);
 
    // load the template
    $result = tpl::load($file, null, $return);
 
    // reset the template data
    tpl::$data = $tplData;
 
    return $result;
 
  }
 
}
 
/
home
/
dh_wsdvbk
/
masonstudio.com
/
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
   */
/
home
/
dh_wsdvbk
/
masonstudio.com
/
kirby
/
kirby.php
      // check for modified content within the content folder
      // and auto-expire the page cache in such a case
      if($this->options['cache.autoupdate'] and $this->cache()->exists($cacheId)) {
 
        // get the creation date of the cache file
        $created = $this->cache()->created($cacheId);
 
        // make sure to kill the cache if the site has been modified
        if($this->site->wasModifiedAfter($created)) {
          $this->cache()->remove($cacheId);
        }
 
      }
 
      // 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
   */
/
home
/
dh_wsdvbk
/
masonstudio.com
/
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;
    }
 
  }
 
}
/
home
/
dh_wsdvbk
/
masonstudio.com
/
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
   */
/
home
/
dh_wsdvbk
/
masonstudio.com
/
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
empty
empty
empty
empty
empty
Key Value
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /projects/duke-condominium
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/2.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /projects/duke-condominium
REMOTE_PORT 53058
SCRIPT_FILENAME /home/dh_wsdvbk/masonstudio.com/index.php
SERVER_ADMIN webmaster@masonstudio.com
CONTEXT_DOCUMENT_ROOT /home/dh_wsdvbk/masonstudio.com
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/dh_wsdvbk/masonstudio.com
REMOTE_ADDR 100.25.40.11
SERVER_PORT 443
SERVER_ADDR 208.113.188.190
SERVER_NAME masonstudio.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
HTTP_HOST masonstudio.com
HTTP_REFERER http://masonstudio.com/projects/duke-condominium
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
SSL_TLS_SNI masonstudio.com
HTTPS on
H2_STREAM_TAG 47-3
H2_STREAM_ID 3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH off
H2PUSH off
HTTP2 on
DH_USER dh_wsdvbk
ds_id_47897254
dsid 47897254
SCRIPT_URI https://masonstudio.com/projects/duke-condominium
SCRIPT_URL /projects/duke-condominium
QS_ConnectionId 17108368247556198973043
UNIQUE_ID ZflMWaj33LrG4JLhXWqykAAAAAM
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI masonstudio.com
REDIRECT_HTTPS on
REDIRECT_H2_STREAM_TAG 47-3
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH off
REDIRECT_H2PUSH off
REDIRECT_HTTP2 on
REDIRECT_DH_USER dh_wsdvbk
REDIRECT_ds_id_47897254
REDIRECT_dsid 47897254
REDIRECT_SCRIPT_URI https://masonstudio.com/projects/duke-condominium
REDIRECT_SCRIPT_URL /projects/duke-condominium
REDIRECT_QS_ConnectionId 17108368247556198973043
REDIRECT_UNIQUE_ID ZflMWaj33LrG4JLhXWqykAAAAAM
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710836825.7854
REQUEST_TIME 1710836825
Key Value
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /projects/duke-condominium
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/2.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /projects/duke-condominium
REMOTE_PORT 53058
SCRIPT_FILENAME /home/dh_wsdvbk/masonstudio.com/index.php
SERVER_ADMIN webmaster@masonstudio.com
CONTEXT_DOCUMENT_ROOT /home/dh_wsdvbk/masonstudio.com
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/dh_wsdvbk/masonstudio.com
REMOTE_ADDR 100.25.40.11
SERVER_PORT 443
SERVER_ADDR 208.113.188.190
SERVER_NAME masonstudio.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
HTTP_HOST masonstudio.com
HTTP_REFERER http://masonstudio.com/projects/duke-condominium
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
SSL_TLS_SNI masonstudio.com
HTTPS on
H2_STREAM_TAG 47-3
H2_STREAM_ID 3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH off
H2PUSH off
HTTP2 on
DH_USER dh_wsdvbk
ds_id_47897254
dsid 47897254
SCRIPT_URI https://masonstudio.com/projects/duke-condominium
SCRIPT_URL /projects/duke-condominium
QS_ConnectionId 17108368247556198973043
UNIQUE_ID ZflMWaj33LrG4JLhXWqykAAAAAM
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI masonstudio.com
REDIRECT_HTTPS on
REDIRECT_H2_STREAM_TAG 47-3
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH off
REDIRECT_H2PUSH off
REDIRECT_HTTP2 on
REDIRECT_DH_USER dh_wsdvbk
REDIRECT_ds_id_47897254
REDIRECT_dsid 47897254
REDIRECT_SCRIPT_URI https://masonstudio.com/projects/duke-condominium
REDIRECT_SCRIPT_URL /projects/duke-condominium
REDIRECT_QS_ConnectionId 17108368247556198973043
REDIRECT_UNIQUE_ID ZflMWaj33LrG4JLhXWqykAAAAAM
FCGI_ROLE RESPONDER
0. Whoops\Handler\PrettyPageHandler