get_field('swatch_category_slug'), );?> <div class="row mx-0"> <?php foreach ($attributes as $attribute) { $swatchType = get_term_meta($attribute->term_id, 'swatches_&_colours'); if (!empty($swatchType)) { ?> <?php if ($swatchType[0] == 'Image' || $swatchType[0] == 'Swatch') { ?> <div class="col-1 ps-0 pe-1 pb-1 single-swatch"> <div id="swatch<?php echo $swatchType[0]; ?>" class="w-100 h-100"> <?php if ($swatchType[0] == 'Image') { ?> // 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 <?php wp_body_open(); ?> <?php echo get_field('body', 'option'); ?> <?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 echo get_field('footer', 'option'); ?> <?php wp_footer(); ?> * * @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';}<?php/** * WordPress View Bootstrapper */define('WP_USE_THEMES', true);require __DIR__ . '/wp/wp-blog-header.php'; get_field('swatch_category_slug'), );?> <div class="row mx-0"> <?php foreach ($attributes as $attribute) { $swatchType = get_term_meta($attribute->term_id, 'swatches_&_colours'); if (!empty($swatchType)) { ?> <?php if ($swatchType[0] == 'Image' || $swatchType[0] == 'Swatch') { ?> <div class="col-1 ps-0 pe-1 pb-1 single-swatch"> <div id="swatch<?php echo $swatchType[0]; ?>" class="w-100 h-100"> <?php if ($swatchType[0] == 'Image') { ?> * @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; } get_field('swatch_category_slug'), );?> <div class="row mx-0"> <?php foreach ($attributes as $attribute) { $swatchType = get_term_meta($attribute->term_id, 'swatches_&_colours'); if (!empty($swatchType)) { ?> <?php if ($swatchType[0] == 'Image' || $swatchType[0] == 'Swatch') { ?> <div class="col-1 ps-0 pe-1 pb-1 single-swatch"> <div id="swatch<?php echo $swatchType[0]; ?>" class="w-100 h-100"> <?php if ($swatchType[0] == 'Image') { ?> // Avoid the array_slice() if possible. if ( 0 == $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); * * @param array $args Parameters to pass to the callback functions. */ public function do_action( $args ) { $this->doing_action = true; $this->apply_filters( '', $args ); // If there are recursive calls to the current action, we haven't finished it until we get to the last one. if ( ! $this->nesting_level ) { $this->doing_action = false; } } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) { // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`. $arg[0] = $arg[0][0]; } $wp_filter[ $hook_name ]->do_action( $arg ); array_pop( $wp_current_filter );}/** <?php do_action( 'woocommerce_after_variations_form' ); ?></form><?phpdo_action( 'woocommerce_after_add_to_cart_form' ); extract( $args ); // @codingStandardsIgnoreLine } do_action( 'woocommerce_before_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] ); include $action_args['located']; do_action( 'woocommerce_after_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] );}/** wc_get_template( 'single-product/add-to-cart/variable.php', array( 'available_variations' => $get_variations ? $product->get_available_variations() : false, 'attributes' => $product->get_variation_attributes(), 'selected_attributes' => $product->get_default_attributes(), ) ); }}if ( ! function_exists( 'woocommerce_external_add_to_cart' ) ) { // Avoid the array_slice() if possible. if ( 0 == $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); * * @param array $args Parameters to pass to the callback functions. */ public function do_action( $args ) { $this->doing_action = true; $this->apply_filters( '', $args ); // If there are recursive calls to the current action, we haven't finished it until we get to the last one. if ( ! $this->nesting_level ) { $this->doing_action = false; } } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) { // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`. $arg[0] = $arg[0][0]; } $wp_filter[ $hook_name ]->do_action( $arg ); array_pop( $wp_current_filter );}/** /** * Trigger the single product add to cart action. */ function woocommerce_template_single_add_to_cart() { global $product; do_action( 'woocommerce_' . $product->get_type() . '_add_to_cart' ); }}if ( ! function_exists( 'woocommerce_simple_add_to_cart' ) ) { /** // Avoid the array_slice() if possible. if ( 0 == $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); * * @param array $args Parameters to pass to the callback functions. */ public function do_action( $args ) { $this->doing_action = true; $this->apply_filters( '', $args ); // If there are recursive calls to the current action, we haven't finished it until we get to the last one. if ( ! $this->nesting_level ) { $this->doing_action = false; } } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) { // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`. $arg[0] = $arg[0][0]; } $wp_filter[ $hook_name ]->do_action( $arg ); array_pop( $wp_current_filter );}/** * @hooked woocommerce_template_single_add_to_cart - 30 * @hooked woocommerce_template_single_meta - 40 * @hooked woocommerce_template_single_sharing - 50 * @hooked WC_Structured_Data::generate_product_data() - 60 */ do_action( 'woocommerce_single_product_summary' ); ?> </div> <?php /** do_action( 'wp_before_load_template', $_template_file, $load_once, $args ); if ( $load_once ) { require_once $_template_file; } else { require $_template_file; } /** * Fires after a template file is loaded. * // Allow 3rd party plugins to filter template file from their plugin. $template = apply_filters( 'wc_get_template_part', $template, $slug, $name ); if ( $template ) { load_template( $template, false ); }}/** * Get other templates (e.g. product attributes) passing attributes and including the file. ?> <?php while(have_posts()): ?> <?php the_post(); wc_get_template_part('content', 'single-product'); ?> <?php endwhile; ?> <?php do_action('woocommerce_after_main_content'); $__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 <?php wp_body_open(); ?> <?php echo get_field('body', 'option'); ?> <?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 echo get_field('footer', 'option'); ?> <?php wp_footer(); ?> * * @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';}<?php/** * WordPress View Bootstrapper */define('WP_USE_THEMES', true);require __DIR__ . '/wp/wp-blog-header.php';|
[2/2]
ViewException
|
|---|
Illuminate\View\ViewException:
Attempt to read property "term_id" on array (View: /home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/resources/views/woocommerce/single-product.blade.php)
at /home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/app/wc-template-hooks.php:402
at Illuminate\View\Engines\CompilerEngine->handleViewException()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/Engines/PhpEngine.php:60)
at Illuminate\View\Engines\PhpEngine->evaluatePath()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/Engines/CompilerEngine.php:70)
at Illuminate\View\Engines\CompilerEngine->get()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/View.php:195)
at Illuminate\View\View->getContents()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/View.php:178)
at Illuminate\View\View->renderContents()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/View.php:147)
at Illuminate\View\View->render()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/index.php:17)
at include('/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/index.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/template-loader.php:106)
at require_once('/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/template-loader.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-blog-header.php:19)
at require('/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-blog-header.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/index.php:6)
|
|
[1/2]
ErrorException
|
|---|
ErrorException:
Attempt to read property "term_id" on array
at /home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/app/wc-template-hooks.php:402
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49)
at Roots\Acorn\Bootstrap\HandleExceptions->handleError()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/app/wc-template-hooks.php:402)
at App\{closure}()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/class-wp-hook.php:308)
at WP_Hook->apply_filters()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/class-wp-hook.php:332)
at WP_Hook->do_action()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/plugin.php:517)
at do_action()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/templates/single-product/add-to-cart/variable.php:85)
at include('/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/templates/single-product/add-to-cart/variable.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/includes/wc-core-functions.php:345)
at wc_get_template()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/includes/wc-template-functions.php:1748)
at woocommerce_variable_add_to_cart()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/class-wp-hook.php:308)
at WP_Hook->apply_filters()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/class-wp-hook.php:332)
at WP_Hook->do_action()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/plugin.php:517)
at do_action()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/includes/wc-template-functions.php:1694)
at woocommerce_template_single_add_to_cart()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/class-wp-hook.php:308)
at WP_Hook->apply_filters()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/class-wp-hook.php:332)
at WP_Hook->do_action()
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/plugin.php:517)
at do_action()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/templates/content-single-product.php:60)
at require('/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/templates/content-single-product.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/template.php:785)
at load_template()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/plugins/woocommerce/includes/wc-core-functions.php:284)
at wc_get_template_part()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/cache/acorn/framework/views/f58a13c7f00180a20ade16333eac7ea2dc2e6f61.php:10)
at require('/home/forge/fiddes.celfapps.com/releases/12/web/app/cache/acorn/framework/views/f58a13c7f00180a20ade16333eac7ea2dc2e6f61.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/filesystem/Filesystem.php:109)
at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/filesystem/Filesystem.php:110)
at Illuminate\Filesystem\Filesystem->getRequire()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/Engines/PhpEngine.php:58)
at Illuminate\View\Engines\PhpEngine->evaluatePath()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/Engines/CompilerEngine.php:70)
at Illuminate\View\Engines\CompilerEngine->get()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/View.php:195)
at Illuminate\View\View->getContents()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/View.php:178)
at Illuminate\View\View->renderContents()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/vendor/illuminate/view/View.php:147)
at Illuminate\View\View->render()
(/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/index.php:17)
at include('/home/forge/fiddes.celfapps.com/releases/12/web/app/themes/fiddes-uk/index.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/template-loader.php:106)
at require_once('/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-includes/template-loader.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-blog-header.php:19)
at require('/home/forge/fiddes.celfapps.com/releases/12/web/wp/wp-blog-header.php')
(/home/forge/fiddes.celfapps.com/releases/12/web/index.php:6)
|