Illuminate\View\ViewException {#2749 #severity: E_ERROR }
$writers = $this->getWriters();
return [
'title' => $this->title(),
'kicker' => $kickerData['kicker'],
'kicker_path' => $kickerData['kicker_path'],
'img_src' => $mainImageData->image_path,
//'img_src' => '123',
'caption' => $mainImageData->caption,
//'caption' => '12345',
'credit' => $mainImageData->credit,
//'credit' => '12345',
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
} catch (Throwable $e) {
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
try {
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
} catch (ViewException $e) {
if (! str($e->getMessage())->contains(['No such file or directory', 'File does not exist at path'])) {
throw $e;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// clear out the sections for any separate views that may be rendered.
$this->factory->incrementRender();
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each section gets flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
* @throws \Throwable
*/
public function render(?callable $callback = null)
{
try {
$contents = $this->renderContents();
$response = isset($callback) ? $callback($this, $contents) : null;
// Once we have the contents of the view, we will flush the sections if we are
// done rendering all views so that there is nothing left hanging over when
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
$writers = $this->getWriters();
return [
'title' => $this->title(),
'kicker' => $kickerData['kicker'],
'kicker_path' => $kickerData['kicker_path'],
'img_src' => $mainImageData->image_path,
//'img_src' => '123',
'caption' => $mainImageData->caption,
//'caption' => '12345',
'credit' => $mainImageData->credit,
//'credit' => '12345',
* @throws \ErrorException
*/
public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
try {
parent::handleError($level, $message, $file, $line, $context);
} catch (Throwable $e) {
if (! apply_filters('acorn/throw_error_exception', true, $e)) {
return false;
}
$writers = $this->getWriters();
return [
'title' => $this->title(),
'kicker' => $kickerData['kicker'],
'kicker_path' => $kickerData['kicker_path'],
'img_src' => $mainImageData->image_path,
//'img_src' => '123',
'caption' => $mainImageData->caption,
//'caption' => '12345',
'credit' => $mainImageData->credit,
//'credit' => '12345',
*
* @return array
*/
protected function merge()
{
[$with, $override] = [$this->with(), $this->override()];
if (! $with && ! $override) {
return array_merge(
$this->extractPublicProperties(),
$this->extractPublicMethods(),
public function compose(View $view)
{
$this->view = $view;
$this->data = new Fluent($view->getData());
$view->with($this->merge());
}
/**
* The merged data to be passed to view before rendering.
*
// Once we have the class and method name, we can build the Closure to resolve
// the instance out of the IoC container and call the method on it with the
// given arguments that are passed to the Closure as the composer's data.
return function () use ($class, $method) {
return $this->container->make($class)->{$method}(...func_get_args());
};
}
/**
* Parse a class based composer name.
*/
protected function addEventListener($name, $callback)
{
if (str_contains($name, '*')) {
$callback = function ($name, array $data) use ($callback) {
return $callback($data[0]);
};
}
$this->events->listen($name, $callback);
}
return $this->createClassListener($listener, $wildcard);
}
return function ($event, $payload) use ($listener, $wildcard) {
if ($wildcard) {
return $listener($event, $payload);
}
return $listener(...array_values($payload));
};
}
}
$responses = [];
foreach ($this->getListeners($event) as $listener) {
$response = $listener($event, $payload);
// If a response is returned from the listener and event halting is enabled
// we will just return this response, and not call the rest of the event
// listeners. Otherwise we will add the response on the response list.
if ($halt && ! is_null($response)) {
);
return null;
}
return $this->invokeListeners($event, $payload, $halt);
}
/**
* Broadcast an event and call its listeners.
*
* @param \Illuminate\Contracts\View\View $view
* @return void
*/
public function callComposer(ViewContract $view)
{
$this->events->dispatch('composing: '.$view->name(), [$view]);
}
/**
* Call the creator for a given view.
*
// We will keep track of the number of views being rendered so we can flush
// the section after the complete rendering operation is done. This will
// clear out the sections for any separate views that may be rendered.
$this->factory->incrementRender();
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each section gets flushed out next time a view is created and
* @throws \Throwable
*/
public function render(?callable $callback = null)
{
try {
$contents = $this->renderContents();
$response = isset($callback) ? $callback($this, $contents) : null;
// Once we have the contents of the view, we will flush the sections if we are
// done rendering all views so that there is nothing left hanging over when
<?php $__env->startSection('content'); ?>
<?php while(have_posts()): ?>
<?php (the_post()); ?>
<?php echo $__env->first(['partials.content-single-' . get_post_type(), 'partials.content-single'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endwhile; ?>
<?php $__env->stopSection(); ?>
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
} catch (Throwable $e) {
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
try {
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
} catch (ViewException $e) {
if (! str($e->getMessage())->contains(['No such file or directory', 'File does not exist at path'])) {
throw $e;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// clear out the sections for any separate views that may be rendered.
$this->factory->incrementRender();
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each section gets flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
* @throws \Throwable
*/
public function render(?callable $callback = null)
{
try {
$contents = $this->renderContents();
$response = isset($callback) ? $callback($this, $contents) : null;
// Once we have the contents of the view, we will flush the sections if we are
// done rendering all views so that there is nothing left hanging over when
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
[2/2]
ViewException
|
---|
Illuminate\View\ViewException: Attempt to read property "image_path" on null (View: /var/www/dailyorange.com/wp-content/themes/euclid-sage/resources/views/single.blade.php) at /var/www/dailyorange.com/wp-content/themes/euclid-sage/app/View/Composers/Post.php:41 at Illuminate\View\Engines\CompilerEngine->handleViewException() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Engines/PhpEngine.php:60) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Engines/CompilerEngine.php:72) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:207) at Illuminate\View\View->getContents() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:190) at Illuminate\View\View->renderContents() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:159) at Illuminate\View\View->render() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/index.php:29) at include('/var/www/dailyorange.com/wp-content/themes/euclid-sage/index.php') (/var/www/dailyorange.com/wp-includes/template-loader.php:106) at require_once('/var/www/dailyorange.com/wp-includes/template-loader.php') (/var/www/dailyorange.com/wp-blog-header.php:19) at require('/var/www/dailyorange.com/wp-blog-header.php') (/var/www/dailyorange.com/index.php:17) |
[1/2]
ErrorException
|
---|
ErrorException: Attempt to read property "image_path" on null at /var/www/dailyorange.com/wp-content/themes/euclid-sage/app/View/Composers/Post.php:41 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49) at Roots\Acorn\Bootstrap\HandleExceptions->handleError() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/app/View/Composers/Post.php:41) at App\View\Composers\Post->override() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/roots/acorn/src/Roots/Acorn/View/Composer.php:93) at Roots\Acorn\View\Composer->merge() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/roots/acorn/src/Roots/Acorn/View/Composer.php:83) at Roots\Acorn\View\Composer->compose() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Concerns/ManagesEvents.php:124) at Illuminate\View\Factory->{closure:Illuminate\View\Concerns\ManagesEvents::buildClassEventCallback():123}() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Concerns/ManagesEvents.php:162) at Illuminate\View\Factory->{closure:Illuminate\View\Concerns\ManagesEvents::addEventListener():161}() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/events/Dispatcher.php:455) at Illuminate\Events\Dispatcher->{closure:Illuminate\Events\Dispatcher::makeListener():453}() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/events/Dispatcher.php:286) at Illuminate\Events\Dispatcher->invokeListeners() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/events/Dispatcher.php:266) at Illuminate\Events\Dispatcher->dispatch() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Concerns/ManagesEvents.php:177) at Illuminate\View\Factory->callComposer() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:188) at Illuminate\View\View->renderContents() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:159) at Illuminate\View\View->render() (/var/www/dailyorange.com/wp-content/cache/acorn/framework/views/5cb8ae41c8e61af609abe133bb5c6954.php:4) at require('/var/www/dailyorange.com/wp-content/cache/acorn/framework/views/5cb8ae41c8e61af609abe133bb5c6954.php') (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/filesystem/Filesystem.php:123) at Illuminate\Filesystem\Filesystem::{closure:Illuminate\Filesystem\Filesystem::getRequire():120}() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/filesystem/Filesystem.php:124) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/Engines/CompilerEngine.php:72) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:207) at Illuminate\View\View->getContents() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:190) at Illuminate\View\View->renderContents() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/vendor/illuminate/view/View.php:159) at Illuminate\View\View->render() (/var/www/dailyorange.com/wp-content/themes/euclid-sage/index.php:29) at include('/var/www/dailyorange.com/wp-content/themes/euclid-sage/index.php') (/var/www/dailyorange.com/wp-includes/template-loader.php:106) at require_once('/var/www/dailyorange.com/wp-includes/template-loader.php') (/var/www/dailyorange.com/wp-blog-header.php:19) at require('/var/www/dailyorange.com/wp-blog-header.php') (/var/www/dailyorange.com/index.php:17) |