Twig \ Error \ RuntimeError
Stack frames (34)
33
Twig\Error\RuntimeError
/var/www/html/store/site/templates/twig/parts/part/page.twig1
32
ProcessWire\WireException
/var/www/html/store/wire/core/Wire.php564
31
ProcessWire\Wire
___callUnknown
/var/www/html/store/wire/core/Wire.php420
30
ProcessWire\Wire
_callMethod
/var/www/html/store/wire/core/WireHooks.php951
29
ProcessWire\WireHooks
runHooks
/var/www/html/store/wire/core/Wire.php485
28
ProcessWire\Wire
__call
/var/www/html/store/wire/core/Wire.php488
27
ProcessWire\Wire
__call
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Extension/CoreExtension.php1499
26
twig_get_attribute
/var/www/html/store/site/templates/twig/cache/a6/a643185622a89560b66a35e8d1b2bddcdc438810e000cdd139e213d044568008.php37
25
__TwigTemplate_ccc890f8a30667bb58b498e5bfd5989bc8f542a7648cc36dc5de7740f752b24e
doDisplay
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Template.php407
24
Twig\Template
displayWithErrorHandling
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Template.php380
23
Twig\Template
display
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Template.php392
22
Twig\Template
render
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/TemplateWrapper.php45
21
Twig\TemplateWrapper
render
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Environment.php318
20
Twig\Environment
render
/var/www/html/store/site/controllers/classes/Part.php50
19
Controllers\Part
index
…/src/Routers/Router.php209
18
Mvc\Routers\Router
handle
…/src/Routers/Router.php98
17
Mvc\Routers\Router
handleRoute
…/src/Routers/Router.php86
16
Mvc\Routers\Router
route
/var/www/html/store/site/assets/cache/FileCompiler/site/templates/part.php14
15
require
/var/www/html/store/wire/core/TemplateFile.php327
14
ProcessWire\TemplateFile
___render
/var/www/html/store/wire/core/Wire.php414
13
ProcessWire\Wire
_callMethod
/var/www/html/store/wire/core/WireHooks.php951
12
ProcessWire\WireHooks
runHooks
/var/www/html/store/wire/core/Wire.php485
11
ProcessWire\Wire
__call
/var/www/html/store/wire/modules/PageRender.module554
10
ProcessWire\PageRender
___renderPage
/var/www/html/store/wire/core/Wire.php417
9
ProcessWire\Wire
_callMethod
/var/www/html/store/wire/core/WireHooks.php951
8
ProcessWire\WireHooks
runHooks
/var/www/html/store/wire/core/Wire.php485
7
ProcessWire\Wire
__call
/var/www/html/store/wire/core/WireHooks.php1059
6
ProcessWire\WireHooks
runHooks
/var/www/html/store/wire/core/Wire.php485
5
ProcessWire\Wire
__call
/var/www/html/store/wire/modules/Process/ProcessPageView.module225
4
ProcessWire\ProcessPageView
renderPage
/var/www/html/store/wire/modules/Process/ProcessPageView.module171
3
ProcessWire\ProcessPageView
___execute
/var/www/html/store/wire/core/Wire.php417
2
ProcessWire\Wire
_callMethod
/var/www/html/store/wire/core/WireHooks.php951
1
ProcessWire\WireHooks
runHooks
/var/www/html/store/wire/core/Wire.php485
0
ProcessWire\Wire
__call
/var/www/html/store/index.php55
/var/www/html/store/site/templates/twig/parts/part/page.twig
{% set brand = pages.get('template=brand,code=' ~ page.partdata.brandcode) %} <div class="bar"> <!-- LEFT COLUMN _________________________________________________________--> <p class="lead"> {{ page.item.description|raw }} {% if page.item.description2 %} <br> {{ page.item.description2 }} {% endif %} </p> <p class="goToDescription"> <a href="#details" class="scroll-to text-uppercase">Scroll to part details, Fittings</a> </p> <div id="productMain" class="row"> <div class="col-sm-6"> {% include 'parts/part/sections/image.twig' %} <p class="lead">{{ page.item.description|raw }}</p> </div> <div class="col-sm-6"> <div class="card"> <div class="card-header"> <h3>{{ page.itemid }} - {{ page.item.description|raw }}</h3> </div> <div class="card-body"> <p> <b>Part #:</b> {{ page.itemid }} </p> <p> <b>Brand:</b> {{ page.partdata.brandcode }} </p> <p> <b>Line:</b> {{ page.partdata.brandlinecode }} </p> </div> </div> {# include 'parts/part/sections/supercededby.twig' with {'part': page} #} <div class="box">
/var/www/html/store/wire/core/Wire.php
* $event->replace = true; * // Now do something with the information you have, for example * // you might want to populate a value to $event->return if * // you want the unknown method to return a value. * }); * ~~~~~ * * #pw-hooker * * @param string $method Requested method name * @param array $arguments Arguments provided * @return null|mixed Return value of method (if applicable) * @throws WireException * */ protected function ___callUnknown($method, $arguments) { if($arguments) {} // intentional to avoid unused argument notice $config = $this->wire()->config; if($config && $config->disableUnknownMethodException) return null; throw new WireException("Method " . $this->className() . "::$method does not exist or is not callable in this context"); } /** * Provides the implementation for calling hooks in ProcessWire * * Unlike __call, this method won't trigger an Exception if the hook and method don't exist. * Instead it returns a result array containing information about the call. * * #pw-internal * * @param string $method Method or property to run hooks for. * @param array $arguments Arguments passed to the method and hook. * @param string|array $type May be either 'method', 'property' or array of hooks (from getHooks) to run. Default is 'method'. * @return array Returns an array with the following information: * [return] => The value returned from the hook or NULL if no value returned or hook didn't exist. * [numHooksRun] => The number of hooks that were actually run. * [methodExists] => Did the hook method exist as a real method in the class? (i.e. with 3 underscores ___method). * [replace] => Set by the hook at runtime if it wants to prevent execution of the original hooked method. * */
Exception message:
Method PartPageData::brandcode does not exist or is not callable in this context
/var/www/html/store/wire/core/Wire.php
* * #pw-internal * * @param string $method * @param array $arguments * @return mixed * */ public function _callMethod($method, $arguments) { $qty = $arguments ? count($arguments) : 0; $result = null; switch($qty) { case 0: $result = $this->$method(); break; case 1: $result = $this->$method($arguments[0]); break; case 2: $result = $this->$method($arguments[0], $arguments[1]); break; case 3: $result = $this->$method($arguments[0], $arguments[1], $arguments[2]); break; default: $result = call_user_func_array(array($this, $method), $arguments); } return $result; } /** * Call a hook method (optimization when it's known for certain the method exists) * * #pw-internal * * @param string $method Method name, without leading "___" * @param array $arguments * @return mixed * */
/var/www/html/store/wire/core/WireHooks.php
'return' => null, 'numHooksRun' => 0, 'methodExists' => $methodExists, 'replace' => false, ); if($type === 'method' || $type === 'property' || $type === 'either') { if(!$methodExists && !$this->isHookedOrParents($object, $method, $type)) { return $result; // exit quickly when we can } } if($hooks === null) $hooks = $this->getHooks($object, $method); foreach(array('before', 'after') as $when) { if($type === 'method') { if($when === 'after' && $result['replace'] !== true) { if($methodExists) { $result['return'] = $object->_callMethod($realMethod, $arguments); } else { $result['return'] = null; } } } else if($type === 'after') { if($when === 'before') continue; } else if($type === 'before') { if($when === 'after') break; } foreach($hooks as $priority => $hook) { if(!$hook['options'][$when]) continue; if($type === 'property' && $hook['options']['type'] === 'method') continue; if($type === 'method' && $hook['options']['type'] === 'property') continue; if(!empty($hook['options']['objMatch'])) { /** @var Selectors $objMatch */ $objMatch = $hook['options']['objMatch']; // object match comparison to determine at runtime whether to execute the hook
/var/www/html/store/wire/core/Wire.php
* See the Wire::runHooks() method for the full implementation of hook calls. * * @param string $method * @param array $arguments * @return mixed * @throws WireException * */ public function __call($method, $arguments) { if(empty($arguments) && Fuel::isCommon($method)) { // faster version of _callWireAPI for when conditions allow if($this->_wire && !method_exists($this, "___$method")) { // get a common API var with no arguments as method call more quickly $val = $this->_wire->fuel($method); if($val !== null) return $val; } } $hooks = $this->_wireHooks(); if($hooks) { $result = $hooks->runHooks($this, $method, $arguments); if(!$result['methodExists'] && !$result['numHooksRun']) { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->callUnknown($method, $arguments); } } else { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->___callUnknown($method, $arguments); } return $result['return']; } /** * Helper to __call() method that maps a call to an API variable when appropriate * * @param string $method * @param array $arguments * @return array|bool * @internal * */
/var/www/html/store/wire/core/Wire.php
* @param array $arguments * @return mixed * @throws WireException * */ public function __call($method, $arguments) { if(empty($arguments) && Fuel::isCommon($method)) { // faster version of _callWireAPI for when conditions allow if($this->_wire && !method_exists($this, "___$method")) { // get a common API var with no arguments as method call more quickly $val = $this->_wire->fuel($method); if($val !== null) return $val; } } $hooks = $this->_wireHooks(); if($hooks) { $result = $hooks->runHooks($this, $method, $arguments); if(!$result['methodExists'] && !$result['numHooksRun']) { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->callUnknown($method, $arguments); } } else { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->___callUnknown($method, $arguments); } return $result['return']; } /** * Helper to __call() method that maps a call to an API variable when appropriate * * @param string $method * @param array $arguments * @return array|bool * @internal * */ protected function _callWireAPI($method, $arguments) { $var = $this->_wire ? $this->_wire->fuel()->$method : null; if(!$var) return false;
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Extension/CoreExtension.php
if ($ignoreStrictCheck || !$env->isStrictVariables()) { return; } throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()"/"has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, $source); } if ($isDefinedTest) { return true; } if ($sandboxed) { $env->getExtension(SandboxExtension::class)->checkMethodAllowed($object, $method, $lineno, $source); } // Some objects throw exceptions when they have __call, and the method we try // to call is not supported. If ignoreStrictCheck is true, we should return null. try { $ret = $object->$method(...$arguments); } catch (\BadMethodCallException $e) { if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) { return; } throw $e; } return $ret; } /** * Returns the values from a single column in the input array. * * <pre> * {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %} * * {% set fruits = items|column('fruit') %} * * {# fruits now contains ['apple', 'orange'] #} * </pre>
/var/www/html/store/site/templates/twig/cache/a6/a643185622a89560b66a35e8d1b2bddcdc438810e000cdd139e213d044568008.php
private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->parent = false; $this->blocks = [ ]; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; // line 1 $context["brand"] = twig_get_attribute($this->env, $this->source, ($context["pages"] ?? null), "get", [0 => ("template=brand,code=" . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["page"] ?? null), "partdata", [], "any", false, false, false, 1), "brandcode", [], "any", false, false, false, 1))], "method", false, false, false, 1); // line 2 echo " <div class=\"bar\"> \t<!-- LEFT COLUMN _________________________________________________________--> \t<p class=\"lead\"> \t\t"; // line 8 echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["page"] ?? null), "item", [], "any", false, false, false, 8), "description", [], "any", false, false, false, 8); echo " \t\t"; // line 9 if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["page"] ?? null), "item", [], "any", false, false, false, 9), "description2", [], "any", false, false, false, 9)) { // line 10 echo "\t\t\t<br> "; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["page"] ?? null), "item", [], "any", false, false, false, 10), "description2", [], "any", false, false, false, 10), "html", null, true); echo " \t\t"; }
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Template.php
} else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e; } return ob_get_clean(); } protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } // this is mostly useful for \Twig\Error\LoaderError exceptions // see \Twig\Error\LoaderError if (-1 === $e->getTemplateLine()) { $e->guess(); } throw $e; } catch (\Exception $e) { $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e); $e->guess(); throw $e; } }
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Template.php
{ return $this; } /** * Returns all blocks. * * This method is for internal use only and should never be called * directly. * * @return array An array of blocks */ public function getBlocks() { return $this->blocks; } public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } public function render(array $context) { $level = ob_get_level(); if ($this->env->isDebug()) { ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e; }
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Template.php
public function getBlocks() { return $this->blocks; } public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } public function render(array $context) { $level = ob_get_level(); if ($this->env->isDebug()) { ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } throw $e; } return ob_get_clean(); } protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); }
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/TemplateWrapper.php
* directly (use Twig\Environment::load() instead). * * @internal */ public function __construct(Environment $env, Template $template) { $this->env = $env; $this->template = $template; } /** * Renders the template. * * @param array $context An array of parameters to pass to the template */ public function render(array $context = []): string { // using func_get_args() allows to not expose the blocks argument // as it should only be used by internal code return $this->template->render($context, \func_get_args()[1] ?? []); } /** * Displays the template. * * @param array $context An array of parameters to pass to the template */ public function display(array $context = []) { // using func_get_args() allows to not expose the blocks argument // as it should only be used by internal code $this->template->display($context, \func_get_args()[1] ?? []); } /** * Checks if a block is defined. * * @param string $name The block name * @param array $context An array of parameters to pass to the template */
/var/www/html/store/site/modules/Pauldro/Twig/vendor/twig/twig/src/Environment.php
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash; return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '___'.$index); } /** * Renders a template. * * @param string|TemplateWrapper $name The template name * @param array $context An array of parameters to pass to the template * * @return string The rendered template * * @throws LoaderError When the template cannot be found * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function render($name, array $context = []) { return $this->load($name)->render($context); } /** * Displays a template. * * @param string|TemplateWrapper $name The template name * @param array $context An array of parameters to pass to the template * * @throws LoaderError When the template cannot be found * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function display($name, array $context = []) { $this->load($name)->display($context); } /** * Loads a template. *
/var/www/html/store/site/controllers/classes/Part.php
} Parts::requestPrice($page->itemid); $page->partdata = $CACHE->fetch($page->itemid); if ($page->partdata === false) { $CACHE->cachePage($page); $page->partdata = $CACHE->fetch($page); } if (self::pw('user')->isLoggedIn() && empty($page->partdata->substitutes) === false && sizeof($page->partdata->substitutes)) { $itemids = $page->partdata->substitutes; $itemids[] = $page->itemid; Parts::requestPriceMultiple($itemids); self::requestPartPagesBuild($itemids); } // PartsImages::instance()->addDocmImageToPage($page); $page->breadcrumbs = $config->twig->render('parts/part/bread-crumbs.twig'); return $config->twig->render('parts/part/page.twig', ['catalog' => PartsCatalog::instance()]); } private static function requestPartPagesBuild($itemIDs) { $pages = PartsPagesRepo::instance(); $list = []; foreach ($itemIDs as $itemID) { if ($pages->exists($itemID) === false) { $list[] = $itemID; } } if (empty($list)) { return true; } return BuildPartPagesCache::instance()->cacheItemids($list); } public static function init() { $m = self::pw('modules')->get('Fowler');
/var/www/html/store/site/modules/Pauldro/Mvc/src/Routers/Router.php
$class = $handler[0]; if (class_exists($class) == false) { throw new Exception("Class $class does not exist"); } $methodName = strtoupper($handler[1]); if (method_exists($class, $methodName) === false) { throw new Exception("Class Method $class::$methodName does not exist"); } $vars = (object) $routeInfo[2]; $vars = array_merge((array) $this->params(), (array) $vars); // convert array to object: // $vars = json_decode(json_encode($vars)); $data = new WireData(); $data->setArray($vars); return $class::$methodName($data); } public function params($index = null, $default = null, $source = null) { // check for php://input and merge with $_REQUEST if ((isset($_SERVER['CONTENT_TYPE']) && stripos($_SERVER['CONTENT_TYPE'], 'application/json') !== false) || (isset($_SERVER['HTTP_CONTENT_TYPE']) && stripos($_SERVER['HTTP_CONTENT_TYPE'], 'application/json') !== false) // PHP build in Webserver !? ) { if ($json = json_decode(@file_get_contents('php://input'), true)) { $_REQUEST = array_merge($_REQUEST, $json); } } $src = $source ? $source : $_REQUEST; return $this->fetch_from_array($src, $index, $default); } public function fetch_from_array(&$array, $index = null, $default = null) {
/var/www/html/store/site/modules/Pauldro/Mvc/src/Routers/Router.php
if (array_key_exists(2, $this->routeInfo)) { $params = $this->routeInfo[2]; if (array_key_exists('pagenbr', $params)) { $input->setPageNum(intval($params['pagenbr'])); } } return $this->handleRoute($this->routeInfo); } /** * Try Calling the Handler Function, catch errors if needed * @param array $routeInfo * @return strings */ protected function handleRoute() { $response = ''; try { $response = $this->handle($this->routeInfo); } catch (Wire404Exception $e) { $this->error = true; throw $e; } catch (Exception $e) { $this->error = true; $response = $this->handleException($e); } return $response; } /** * Return Response after Handling Exception * @param Exception $e * @return string */ protected function handleException(Exception $e) { $whoops = new Whoops(); $whoops->allowQuit(false); $whoops->writeToOutput(false); $whoops->pushHandler($this->getWhoopsEmailPageHandler());
/var/www/html/store/site/modules/Pauldro/Mvc/src/Routers/Router.php
public function setRoutePrefix($prefix = '') { $this->routeprefix = $prefix; } /** * Return Route Handler Call * @return mixed */ public function route() { $input = $this->wire('input'); $dispatcher = $this->dispatcher(); $this->routeInfo = $dispatcher->dispatch($input->requestMethod(), $input->url()); if (array_key_exists(2, $this->routeInfo)) { $params = $this->routeInfo[2]; if (array_key_exists('pagenbr', $params)) { $input->setPageNum(intval($params['pagenbr'])); } } return $this->handleRoute($this->routeInfo); } /** * Try Calling the Handler Function, catch errors if needed * @param array $routeInfo * @return strings */ protected function handleRoute() { $response = ''; try { $response = $this->handle($this->routeInfo); } catch (Wire404Exception $e) { $this->error = true; throw $e; } catch (Exception $e) { $this->error = true; $response = $this->handleException($e); } return $response;
/var/www/html/store/site/assets/cache/FileCompiler/site/templates/part.php
<?php use Controllers\Part; use Controllers\Category; Part::init(); Category::init(); $routes = [ ['GET', '', Part::class, 'index'], ]; $router = new Mvc\Routers\Router(); $router->setRoutes($routes); $router->setRoutePrefix($page->url); $page->html = $router->route(); include(\ProcessWire\wire('files')->compile(\ProcessWire\wire("config")->paths->root . 'site/templates/basic-page.php',array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)));
/var/www/html/store/wire/core/TemplateFile.php
try { // include prepend files foreach($this->prependFilename as $_filename) { if($this->halt) break; $this->fileReady($_filename); require($_filename); $this->fileFinished(); } } catch(\Exception $e) { if($this->fileFailed($this->currentFilename, $e)) throw $this->renderFailed($e); } if($this->halt) { // if prepend file indicates we should halt, then do not render next file $this->returnValue = 0; } else { // include main file to render try { $this->fileReady($this->filename); $this->returnValue = require($this->filename); $this->fileFinished(); } catch(\Exception $e) { if($this->fileFailed($this->filename, $e)) throw $this->renderFailed($e); } } try { // include append files foreach($this->appendFilename as $_filename) { if($this->halt) break; $this->fileReady($_filename); require($_filename); $this->fileFinished(); } } catch(\Exception $e) { if($this->fileFailed($this->currentFilename, $e)) throw $this->renderFailed($e); } $out = ob_get_contents(); ob_end_clean();
/var/www/html/store/wire/core/Wire.php
public function setLocalHooks(array $hooks) { $this->localHooks = $hooks; } /** * Call a method in this object, for use by WireHooks * * #pw-internal * * @param string $method * @param array $arguments * @return mixed * */ public function _callMethod($method, $arguments) { $qty = $arguments ? count($arguments) : 0; $result = null; switch($qty) { case 0: $result = $this->$method(); break; case 1: $result = $this->$method($arguments[0]); break; case 2: $result = $this->$method($arguments[0], $arguments[1]); break; case 3: $result = $this->$method($arguments[0], $arguments[1], $arguments[2]); break; default: $result = call_user_func_array(array($this, $method), $arguments); } return $result; } /** * Call a hook method (optimization when it's known for certain the method exists) * * #pw-internal
/var/www/html/store/wire/core/WireHooks.php
'return' => null, 'numHooksRun' => 0, 'methodExists' => $methodExists, 'replace' => false, ); if($type === 'method' || $type === 'property' || $type === 'either') { if(!$methodExists && !$this->isHookedOrParents($object, $method, $type)) { return $result; // exit quickly when we can } } if($hooks === null) $hooks = $this->getHooks($object, $method); foreach(array('before', 'after') as $when) { if($type === 'method') { if($when === 'after' && $result['replace'] !== true) { if($methodExists) { $result['return'] = $object->_callMethod($realMethod, $arguments); } else { $result['return'] = null; } } } else if($type === 'after') { if($when === 'before') continue; } else if($type === 'before') { if($when === 'after') break; } foreach($hooks as $priority => $hook) { if(!$hook['options'][$when]) continue; if($type === 'property' && $hook['options']['type'] === 'method') continue; if($type === 'method' && $hook['options']['type'] === 'property') continue; if(!empty($hook['options']['objMatch'])) { /** @var Selectors $objMatch */ $objMatch = $hook['options']['objMatch']; // object match comparison to determine at runtime whether to execute the hook
/var/www/html/store/wire/core/Wire.php
* See the Wire::runHooks() method for the full implementation of hook calls. * * @param string $method * @param array $arguments * @return mixed * @throws WireException * */ public function __call($method, $arguments) { if(empty($arguments) && Fuel::isCommon($method)) { // faster version of _callWireAPI for when conditions allow if($this->_wire && !method_exists($this, "___$method")) { // get a common API var with no arguments as method call more quickly $val = $this->_wire->fuel($method); if($val !== null) return $val; } } $hooks = $this->_wireHooks(); if($hooks) { $result = $hooks->runHooks($this, $method, $arguments); if(!$result['methodExists'] && !$result['numHooksRun']) { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->callUnknown($method, $arguments); } } else { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->___callUnknown($method, $arguments); } return $result['return']; } /** * Helper to __call() method that maps a call to an API variable when appropriate * * @param string $method * @param array $arguments * @return array|bool * @internal * */
/var/www/html/store/wire/modules/PageRender.module
} else { throw new WireException("Invalid output file location or specified file does not exist. $setFilename"); } } else { if($compiler) { $options['filename'] = $compiler->compile($template->filename); $output->setFilename($options['filename']); $output->setChdir(dirname($template->filename)); } else { $options['filename'] = $template->filename; } } // pass along the $options as a local variable to the template so that one can provide their // own additional variables in it if they want to $output->set('options', $options); $profiler = $this->wire('profiler'); $profilerEvent = $profiler ? $profiler->start($page->path, $this, array('page' => $page)) : null; $data = $output->render(); if($profilerEvent) $profiler->stop($profilerEvent); if(!strlen($data) && $page->template->name === 'admin' && !is_readable($options['filename'])) { throw new WireException('Missing or non-readable template file: ' . basename($options['filename'])); } } if($this->wire('config')->useMarkupRegions) { $contentType = $template->contentType; if(empty($contentType) || stripos($contentType, 'html') !== false) { $this->populateMarkupRegions($data); } } if($data && $cacheAllowed && $cacheFile) { $data = $this->saveCacheFileReady($page, $data); $cacheFile->save($data); } $event->return = $data;
/var/www/html/store/wire/core/Wire.php
/** * Call a method in this object, for use by WireHooks * * #pw-internal * * @param string $method * @param array $arguments * @return mixed * */ public function _callMethod($method, $arguments) { $qty = $arguments ? count($arguments) : 0; $result = null; switch($qty) { case 0: $result = $this->$method(); break; case 1: $result = $this->$method($arguments[0]); break; case 2: $result = $this->$method($arguments[0], $arguments[1]); break; case 3: $result = $this->$method($arguments[0], $arguments[1], $arguments[2]); break; default: $result = call_user_func_array(array($this, $method), $arguments); } return $result; } /** * Call a hook method (optimization when it's known for certain the method exists) * * #pw-internal * * @param string $method Method name, without leading "___" * @param array $arguments
/var/www/html/store/wire/core/WireHooks.php
'return' => null, 'numHooksRun' => 0, 'methodExists' => $methodExists, 'replace' => false, ); if($type === 'method' || $type === 'property' || $type === 'either') { if(!$methodExists && !$this->isHookedOrParents($object, $method, $type)) { return $result; // exit quickly when we can } } if($hooks === null) $hooks = $this->getHooks($object, $method); foreach(array('before', 'after') as $when) { if($type === 'method') { if($when === 'after' && $result['replace'] !== true) { if($methodExists) { $result['return'] = $object->_callMethod($realMethod, $arguments); } else { $result['return'] = null; } } } else if($type === 'after') { if($when === 'before') continue; } else if($type === 'before') { if($when === 'after') break; } foreach($hooks as $priority => $hook) { if(!$hook['options'][$when]) continue; if($type === 'property' && $hook['options']['type'] === 'method') continue; if($type === 'method' && $hook['options']['type'] === 'property') continue; if(!empty($hook['options']['objMatch'])) { /** @var Selectors $objMatch */ $objMatch = $hook['options']['objMatch']; // object match comparison to determine at runtime whether to execute the hook
/var/www/html/store/wire/core/Wire.php
* See the Wire::runHooks() method for the full implementation of hook calls. * * @param string $method * @param array $arguments * @return mixed * @throws WireException * */ public function __call($method, $arguments) { if(empty($arguments) && Fuel::isCommon($method)) { // faster version of _callWireAPI for when conditions allow if($this->_wire && !method_exists($this, "___$method")) { // get a common API var with no arguments as method call more quickly $val = $this->_wire->fuel($method); if($val !== null) return $val; } } $hooks = $this->_wireHooks(); if($hooks) { $result = $hooks->runHooks($this, $method, $arguments); if(!$result['methodExists'] && !$result['numHooksRun']) { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->callUnknown($method, $arguments); } } else { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->___callUnknown($method, $arguments); } return $result['return']; } /** * Helper to __call() method that maps a call to an API variable when appropriate * * @param string $method * @param array $arguments * @return array|bool * @internal * */
/var/www/html/store/wire/core/WireHooks.php
if(!$toMethodCallable && strpos($toMethod, "\\") === false && __NAMESPACE__) { $_toMethod = $toMethod; $toMethod = "\\" . __NAMESPACE__ . "\\$toMethod"; $toMethodCallable = is_callable($toMethod); if(!$toMethodCallable) { $toMethod = "\\$_toMethod"; $toMethodCallable = is_callable($toMethod); } } if($toMethodCallable) { $returnValue = $toMethod($event); } else { // hook fail, not callable $returnValue = null; } } else { /** @var Wire $toObject */ if($hook['toPublic']) { // public $returnValue = $toObject->$toMethod($event); } else { // protected or private $returnValue = $toObject->_callMethod($toMethod, array($event)); } $toMethodCallable = true; } if($returnValue !== null) { // hook method/func had an explicit 'return $value;' statement // we can optionally use this rather than $event->return. Can be useful // in cases where a return value doesn’t need to be passed around to // more than one hook if($useHookReturnValue) { $event->return = $returnValue; } } if($profilerEvent) $profiler->stop($profilerEvent); if(!$toMethodCallable) continue;
/var/www/html/store/wire/core/Wire.php
* See the Wire::runHooks() method for the full implementation of hook calls. * * @param string $method * @param array $arguments * @return mixed * @throws WireException * */ public function __call($method, $arguments) { if(empty($arguments) && Fuel::isCommon($method)) { // faster version of _callWireAPI for when conditions allow if($this->_wire && !method_exists($this, "___$method")) { // get a common API var with no arguments as method call more quickly $val = $this->_wire->fuel($method); if($val !== null) return $val; } } $hooks = $this->_wireHooks(); if($hooks) { $result = $hooks->runHooks($this, $method, $arguments); if(!$result['methodExists'] && !$result['numHooksRun']) { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->callUnknown($method, $arguments); } } else { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->___callUnknown($method, $arguments); } return $result['return']; } /** * Helper to __call() method that maps a call to an API variable when appropriate * * @param string $method * @param array $arguments * @return array|bool * @internal * */
/var/www/html/store/wire/modules/Process/ProcessPageView.module
if($this->delayRedirects) { $this->checkProtocol($page); if($this->redirectURL) $this->redirect($this->redirectURL); } try { if($this->requestFile) { $this->responseType = self::responseTypeFile; $this->wire()->setStatus(ProcessWire::statusDownload, array('downloadFile' => $this->requestFile)); $this->sendFile($page, $this->requestFile); } else { $contentType = $this->contentTypeHeader($page, true); $this->wire()->setStatus(ProcessWire::statusRender, array('contentType' => $contentType)); if($config->ajax) $this->responseType = self::responseTypeAjax; return $page->render(); } } catch(Wire404Exception $e) { // 404 exception TemplateFile::clearAll(); return $this->renderNoPage(array( 'reason404' => '404 thrown during page render', 'exception404' => $e, 'page' => $page, 'ready' => true, // let it know ready state already executed )); } catch(\Exception $e) { // other exception (re-throw non 404 exceptions) $this->responseType = self::responseTypeError; $this->failed($e, "Thrown during page render", $page); throw $e; } return '';
/var/www/html/store/wire/modules/Process/ProcessPageView.module
* */ public function ___execute($internal = true) { if(!$internal) return $this->executeExternal(); $this->responseType = self::responseTypeNormal; $config = $this->wire()->config; $timerKey = $config->debug ? 'ProcessPageView.getPage()' : ''; if($config->usePoweredBy !== null) header('X-Powered-By:' . ($config->usePoweredBy ? ' ProcessWire CMS' : '')); $this->wire()->pages->setOutputFormatting(true); if($timerKey) Debug::timer($timerKey); $page = $this->getPage(); if($timerKey) Debug::saveTimer($timerKey, ($page && $page->id ? $page->path : '')); if(!$page || !$page->id) return $this->renderNoPage(); return $this->renderPage($page); } /** * Render Page * * @param Page $page * @return bool|mixed|string * @throws WireException * @since 3.0.173 * */ protected function renderPage(Page $page) { $config = $this->wire()->config; $page->setOutputFormatting(true); $_page = $page; $page = $this->checkAccess($page); if(!$page || $_page->id == $config->http404PageID) {
/var/www/html/store/wire/core/Wire.php
/** * Call a method in this object, for use by WireHooks * * #pw-internal * * @param string $method * @param array $arguments * @return mixed * */ public function _callMethod($method, $arguments) { $qty = $arguments ? count($arguments) : 0; $result = null; switch($qty) { case 0: $result = $this->$method(); break; case 1: $result = $this->$method($arguments[0]); break; case 2: $result = $this->$method($arguments[0], $arguments[1]); break; case 3: $result = $this->$method($arguments[0], $arguments[1], $arguments[2]); break; default: $result = call_user_func_array(array($this, $method), $arguments); } return $result; } /** * Call a hook method (optimization when it's known for certain the method exists) * * #pw-internal * * @param string $method Method name, without leading "___" * @param array $arguments
/var/www/html/store/wire/core/WireHooks.php
'return' => null, 'numHooksRun' => 0, 'methodExists' => $methodExists, 'replace' => false, ); if($type === 'method' || $type === 'property' || $type === 'either') { if(!$methodExists && !$this->isHookedOrParents($object, $method, $type)) { return $result; // exit quickly when we can } } if($hooks === null) $hooks = $this->getHooks($object, $method); foreach(array('before', 'after') as $when) { if($type === 'method') { if($when === 'after' && $result['replace'] !== true) { if($methodExists) { $result['return'] = $object->_callMethod($realMethod, $arguments); } else { $result['return'] = null; } } } else if($type === 'after') { if($when === 'before') continue; } else if($type === 'before') { if($when === 'after') break; } foreach($hooks as $priority => $hook) { if(!$hook['options'][$when]) continue; if($type === 'property' && $hook['options']['type'] === 'method') continue; if($type === 'method' && $hook['options']['type'] === 'property') continue; if(!empty($hook['options']['objMatch'])) { /** @var Selectors $objMatch */ $objMatch = $hook['options']['objMatch']; // object match comparison to determine at runtime whether to execute the hook
/var/www/html/store/wire/core/Wire.php
* See the Wire::runHooks() method for the full implementation of hook calls. * * @param string $method * @param array $arguments * @return mixed * @throws WireException * */ public function __call($method, $arguments) { if(empty($arguments) && Fuel::isCommon($method)) { // faster version of _callWireAPI for when conditions allow if($this->_wire && !method_exists($this, "___$method")) { // get a common API var with no arguments as method call more quickly $val = $this->_wire->fuel($method); if($val !== null) return $val; } } $hooks = $this->_wireHooks(); if($hooks) { $result = $hooks->runHooks($this, $method, $arguments); if(!$result['methodExists'] && !$result['numHooksRun']) { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->callUnknown($method, $arguments); } } else { $result = $this->_callWireAPI($method, $arguments); if(!$result) return $this->___callUnknown($method, $arguments); } return $result['return']; } /** * Helper to __call() method that maps a call to an API variable when appropriate * * @param string $method * @param array $arguments * @return array|bool * @internal * */
/var/www/html/store/index.php
// If ProcessWire is not installed, go to the installer if(is_file("./install.php") && strtolower($_SERVER['REQUEST_URI']) == strtolower($config->urls->root)) { require("./install.php"); exit(0); } else { header("HTTP/1.1 404 Page Not Found"); echo "404 page not found (no site configuration or install.php available)"; exit(0); } } $process = null; $wire = null; try { // Bootstrap ProcessWire's core and make the API available with $wire $wire = new ProcessWire($config); $process = $wire->modules->get('ProcessPageView'); /** @var ProcessPageView $process */ $wire->wire('process', $process); echo $process->execute($config->internal); $config->internal ? $process->finished() : extract($wire->wire('all')->getArray()); } catch(\Exception $e) { // Formulate error message and send to the error handler if($process) $process->failed($e); $wire ? $wire->trackException($e) : $config->trackException($e); $errorMessage = "Exception: " . $e->getMessage() . " (in " . $e->getFile() . " line " . $e->getLine() . ")"; if($config->debug || ($wire && $wire->user && $wire->user->isSuperuser())) $errorMessage .= "\n\n" . $e->getTraceAsString(); trigger_error($errorMessage, E_USER_ERROR); }
Environment & details:
Key | Value |
User ID | |
Session ID | j7khq89fj3270tor6dtl4qu9n1 |
Path | /parts/6064/ |
empty
empty
empty
Key | Value |
wires | j7khq89fj3270tor6dtl4qu9n1 |
Key | Value |
Session | Array ( [dplusdata] => 1 [dpluso] => 1 ) |
Key | Value |
SSL_SERVER_A_KEY | rsaEncryption |
SSL_CLIENT_VERIFY | NONE |
SSL_SECURE_RENEG | true |
SSL_SESSION_ID | 807ffd58f0a602d80492cb9e499de3e33e5df4cb2bdc20d8025a72dd45ab6e7e |
REDIRECT_REDIRECT_UNIQUE_ID | aFz1WQzlP3yLgUvmuxBUrQAAAA8 |
SERVER_SIGNATURE | |
SSL_TLS_SNI | fowlerpartsservice.com |
UNIQUE_ID | aFz1WQzlP3yLgUvmuxBUrQAAAA8 |
REDIRECT_SSL_SERVER_I_DN_CN | Go Daddy Secure Certificate Authority - G2 |
SSL_VERSION_LIBRARY | OpenSSL/3.5.0 |
REDIRECT_REDIRECT_SSL_TLS_SNI | fowlerpartsservice.com |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
REDIRECT_SSL_SERVER_I_DN | CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\, Inc.,L=Scottsdale,ST=Arizona,C=US |
REDIRECT_REDIRECT_STATUS | 200 |
PHPRC | /etc/php.ini |
SERVER_PORT | 443 |
HTTP_HOST | fowlerpartsservice.com |
SSL_SESSION_RESUMED | Initial |
SSL_CIPHER_ALGKEYSIZE | 256 |
REDIRECT_SSL_CIPHER | TLS_AES_256_GCM_SHA384 |
REDIRECT_REDIRECT_proto | https |
SSL_SERVER_I_DN | CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\, Inc.,L=Scottsdale,ST=Arizona,C=US |
SSL_SERVER_I_DN_ST | Arizona |
REDIRECT_HANDLER | php-fastcgi |
DOCUMENT_ROOT | /var/www/html/store/ |
REDIRECT_SSL_SERVER_V_END | Oct 20 14:25:58 2025 GMT |
SCRIPT_FILENAME | /var/www/html/store/index.php |
HTTPS | on |
REDIRECT_SSL_CIPHER_USEKEYSIZE | 256 |
REDIRECT_SSL_SECURE_RENEG | true |
REQUEST_URI | /parts/6064/ |
SSL_SERVER_I_DN_OU | http://certs.godaddy.com/repository/ |
SCRIPT_NAME | /index.php |
REDIRECT_SSL_SESSION_ID | 807ffd58f0a602d80492cb9e499de3e33e5df4cb2bdc20d8025a72dd45ab6e7e |
REDIRECT_SSL_CIPHER_ALGKEYSIZE | 256 |
REDIRECT_SSL_COMPRESS_METHOD | NULL |
SSL_SERVER_S_DN | CN=fowlerpartsservice.com |
SSL_VERSION_INTERFACE | mod_ssl/2.4.63 |
SSL_SERVER_I_DN_C | US |
SSL_SERVER_I_DN_L | Scottsdale |
SSL_CIPHER_EXPORT | false |
REDIRECT_SSL_PROTOCOL | TLSv1.3 |
SSL_COMPRESS_METHOD | NULL |
SSL_SERVER_I_DN_O | GoDaddy.com, Inc. |
REDIRECT_SSL_SERVER_A_KEY | rsaEncryption |
PHP_FCGI_CHILDREN | 4 |
REMOTE_PORT | 28929 |
PATH | /sbin:/usr/sbin:/bin:/usr/bin |
CONTEXT_PREFIX | /cgi-bin/ |
SSL_CIPHER | TLS_AES_256_GCM_SHA384 |
PWD | /var/www/cgi-bin |
SERVER_ADMIN | webmaster@localhost |
REDIRECT_REDIRECT_HTTPS | on |
SSL_SERVER_A_SIG | sha256WithRSAEncryption |
REDIRECT_SSL_SERVER_I_DN_ST | Arizona |
REDIRECT_SSL_SERVER_I_DN_C | US |
REDIRECT_SSL_SERVER_S_DN_CN | fowlerpartsservice.com |
REDIRECT_UNIQUE_ID | aFz1WQzlP3yLgUvmuxBUrQAAAA8 |
REDIRECT_REDIRECT_HTTP_MOD_REWRITE | On |
REQUEST_SCHEME | https |
SSL_SERVER_M_SERIAL | AC2299A8AFFE5403 |
REDIRECT_HTTP_MOD_REWRITE | On |
REDIRECT_SSL_CIPHER_EXPORT | false |
REDIRECT_SSL_TLS_SNI | fowlerpartsservice.com |
SSL_PROTOCOL | TLSv1.3 |
REDIRECT_STATUS | 200 |
REDIRECT_SSL_SERVER_M_SERIAL | AC2299A8AFFE5403 |
REDIRECT_SSL_SERVER_M_VERSION | 3 |
REDIRECT_HTTPS | on |
REDIRECT_QUERY_STRING | it=parts/6064/ |
SSL_SERVER_S_DN_CN | fowlerpartsservice.com |
HTTP_REFERER | https://fowlerpartsservice.com/parts/6064 |
REDIRECT_SSL_VERSION_INTERFACE | mod_ssl/2.4.63 |
HTTP_ACCEPT | */* |
REMOTE_ADDR | 216.73.216.142 |
SHLVL | 0 |
SERVER_NAME | fowlerpartsservice.com |
SSL_SERVER_M_VERSION | 3 |
REDIRECT_SSL_SERVER_I_DN_L | Scottsdale |
REDIRECT_SSL_SERVER_I_DN_O | GoDaddy.com, Inc. |
REDIRECT_SSL_SESSION_RESUMED | Initial |
REDIRECT_SSL_SERVER_SAN_DNS_1 | www.fowlerpartsservice.com |
REDIRECT_SSL_SERVER_A_SIG | sha256WithRSAEncryption |
REDIRECT_SSL_SERVER_V_START | Sep 18 14:25:58 2024 GMT |
REDIRECT_SSL_SERVER_SAN_DNS_0 | fowlerpartsservice.com |
SSL_SERVER_SAN_DNS_0 | fowlerpartsservice.com |
SERVER_SOFTWARE | Apache/2.4.63 (Unix) OpenSSL/3.5.0 |
SSL_SERVER_SAN_DNS_1 | www.fowlerpartsservice.com |
QUERY_STRING | it=parts/6064/ |
SERVER_ADDR | 10.17.31.13 |
SSL_SERVER_V_END | Oct 20 14:25:58 2025 GMT |
REDIRECT_SSL_CLIENT_VERIFY | NONE |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_SSL_SERVER_S_DN | CN=fowlerpartsservice.com |
REDIRECT_SSL_VERSION_LIBRARY | OpenSSL/3.5.0 |
SERVER_PROTOCOL | HTTP/1.1 |
HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
REDIRECT_URL | /index.php |
SSL_SERVER_I_DN_CN | Go Daddy Secure Certificate Authority - G2 |
REDIRECT_proto | https |
REQUEST_METHOD | GET |
HTTP_COOKIE | wires=j7khq89fj3270tor6dtl4qu9n1 |
PHP_FCGI_MAX_REQUESTS | 1000 |
CONTEXT_DOCUMENT_ROOT | /var/www/cgi-bin/ |
SSL_SERVER_V_START | Sep 18 14:25:58 2024 GMT |
SSL_CIPHER_USEKEYSIZE | 256 |
REDIRECT_SSL_SERVER_I_DN_OU | http://certs.godaddy.com/repository/ |
ORIG_SCRIPT_FILENAME | /var/www/cgi-bin/php.fastcgi |
ORIG_PATH_INFO | /index.php |
ORIG_PATH_TRANSLATED | /var/www/html/store/index.php |
ORIG_SCRIPT_NAME | /cgi-bin/php.fastcgi |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1750922585.4454 |
REQUEST_TIME | 1750922585 |
empty
0. Mvc\Whoops\Handlers\EmailPage
1. Mvc\Whoops\Handlers\Page