Twig Runtime Error – Twig\Error\RuntimeError Variable "photo" does not exist. 1. in /storage/av07909/www/public_html/templates/galleries/index.html at line 17 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 <h1>Galleries</h1> </div> <div class="gallery section"> <div class="content-wrap grid"> <div class="gallery-wrapper"> {% paginate craft.entries.section('galleries').order('postDate desc').limit(12) as pageInfo, pageEntries %} {% for entry in pageEntries %} <div class="frame"> <a href="{{ entry.getUrl() }}"> <img src="{{ macros.transform(entry.galleryCover.first(), 'crop', 505) }}" srcset="{{ macros.srcset(entry.galleryCover.first(), [670, 1340, 2010]) }}" alt=/> </a> <h2>{{ entry.title }}</h2> </div> {% endfor %} </div> <div class="page-controls"> {% if pageInfo.prevUrl %}<a href="{{ pageInfo.prevUrl }}">Previous Page</a>{% endif %} {% if pageInfo.nextUrl %}<a href="{{ pageInfo.nextUrl }}">Next Page</a>{% endif %} </div> 2. in /storage/av07909/www/public_html/templates/galleries/index.html at line 17 – __TwigTemplate_7122efd1ff823a04fa98e755dd99b38fd1f7b311b290bd8e633e2c8590d9e008::{closure}() 11 12 13 14 15 16 17 18 19 20 21 22 23 <div class="content-wrap grid"> <div class="gallery-wrapper"> {% paginate craft.entries.section('galleries').order('postDate desc').limit(12) as pageInfo, pageEntries %} {% for entry in pageEntries %} <div class="frame"> <a href="{{ entry.getUrl() }}"> <img src="{{ macros.transform(entry.galleryCover.first(), 'crop', 505) }}" srcset="{{ macros.srcset(entry.galleryCover.first(), [670, 1340, 2010]) }}" alt=/> </a> <h2>{{ entry.title }}</h2> </div> {% endfor %} </div> <div class="page-controls"> 3. in /storage/av07909/www/public_html/vendor/twig/twig/src/Template.php at line 182 – __TwigTemplate_7122efd1ff823a04fa98e755dd99b38fd1f7b311b290bd8e633e2c8590d9e008::block_content() 4. in /storage/av07909/www/public_html/templates/_layout.html at line 54 – Twig\Template::displayBlock() 48 49 50 51 52 53 54 55 56 57 58 59 60 </li> </ul> </nav> </div> </header> <main id="content"> {% block content %} {% endblock %} </main> <footer class="site-footer"> <div class="content-wrap"> <ul class="social-icons"> <li> <a href="https://www.facebook.com/kaitlinbrownphotography"> 5. in /storage/av07909/www/public_html/vendor/twig/twig/src/Template.php at line 405 – __TwigTemplate_1de5c5e53e3d86ad9c9ab99ac37fd45c7006aa460ea47c7377b664adcf7dcd75::doDisplay() 6. in /storage/av07909/www/public_html/vendor/twig/twig/src/Template.php at line 378 – Twig\Template::displayWithErrorHandling() 7. in /storage/av07909/www/public_html/templates/galleries/index.html at line 1 – Twig\Template::display() 1 2 3 4 5 6 7 {% extends "_layout" %} {% set title = "Galleries" %} {% import '_macros' as macros %} {% block content %} <div class="page-heading"> 8. in /storage/av07909/www/public_html/vendor/twig/twig/src/Template.php at line 405 – __TwigTemplate_7122efd1ff823a04fa98e755dd99b38fd1f7b311b290bd8e633e2c8590d9e008::doDisplay() 9. in /storage/av07909/www/public_html/vendor/twig/twig/src/Template.php at line 378 – Twig\Template::displayWithErrorHandling() 10. in /storage/av07909/www/public_html/vendor/twig/twig/src/Template.php at line 390 – Twig\Template::display() 11. in /storage/av07909/www/public_html/vendor/twig/twig/src/TemplateWrapper.php at line 45 – Twig\Template::render() 12. in /storage/av07909/www/public_html/vendor/twig/twig/src/Environment.php at line 318 – Twig\TemplateWrapper::render() 13. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/web/View.php at line 389 – Twig\Environment::render() 383 384 385 386 387 388 389 390 391 392 393 394 395 // Render and return $renderingTemplate = $this->_renderingTemplate; $this->_renderingTemplate = $template; $e = null; try { $output = $this->getTwig()->render($template, $variables); } catch (\Throwable $e) { // throw it later } $this->_renderingTemplate = $renderingTemplate; $this->setTemplateMode($oldTemplateMode); 14. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/web/View.php at line 450 – craft\web\View::renderTemplate() 444 445 446 447 448 449 450 451 452 453 454 455 456 $isRenderingPageTemplate = $this->_isRenderingPageTemplate; $this->_isRenderingPageTemplate = true; $e = null; try { $this->beginPage(); echo $this->renderTemplate($template, $variables); $this->endPage(); } catch (\Throwable $e) { // throw it later } $this->_isRenderingPageTemplate = $isRenderingPageTemplate; 15. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/web/Controller.php at line 257 – craft\web\View::renderPageTemplate() 251 252 253 254 255 256 257 258 259 260 261 262 263 } // Prevent a response formatter from overriding the content-type header $this->response->format = YiiResponse::FORMAT_RAW; // Render and return the template $this->response->data = $view->renderPageTemplate($template, $variables, $templateMode); // Set the MIME type for the request based on the matched template's file extension (unless the // Content-Type header was already set, perhaps by the template via the {% header %} tag) $headers = $this->response->getHeaders(); if (!$headers->has('content-type')) { $templateFile = StringHelper::removeRight(strtolower($view->resolveTemplate($template)), '.twig'); 16. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/controllers/TemplatesController.php at line 100 – craft\web\Controller::renderTemplate() 94 95 96 97 98 99 100 101 102 103 104 105 106 // Merge any additional route params $routeParams = Craft::$app->getUrlManager()->getRouteParams(); unset($routeParams['template'], $routeParams['template']); $variables = array_merge($variables, $routeParams); return $this->renderTemplate($template, $variables); } /** * Shows the 'offline' template. * * @return Response 17. craft\controllers\TemplatesController::actionRender() 18. in /storage/av07909/www/public_html/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array() 19. in /storage/av07909/www/public_html/vendor/yiisoft/yii2/base/Controller.php at line 181 – yii\base\InlineAction::runWithParams() 20. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/web/Controller.php at line 190 – yii\base\Controller::runAction() 184 185 186 187 188 189 190 191 192 193 194 195 196 /** * @inheritdoc */ public function runAction($id, $params = []) { try { return parent::runAction($id, $params); } catch (\Throwable $e) { if ($this->request->getAcceptsJson()) { Craft::$app->getErrorHandler()->logException($e); if (!YII_DEBUG && !$e instanceof UserException) { $message = Craft::t('app', 'A server error occurred.'); } else { 21. in /storage/av07909/www/public_html/vendor/yiisoft/yii2/base/Module.php at line 534 – craft\web\Controller::runAction() 22. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/web/Application.php at line 278 – yii\base\Module::runAction() 272 273 274 275 276 277 278 279 280 281 282 283 284 * @param string $route * @param array $params * @return Response|null The result of the action, normalized into a Response object */ public function runAction($route, $params = []) { $result = parent::runAction($route, $params); if ($result !== null) { if ($result instanceof Response) { return $result; } 23. in /storage/av07909/www/public_html/vendor/yiisoft/yii2/web/Application.php at line 104 – craft\web\Application::runAction() 24. in /storage/av07909/www/public_html/vendor/craftcms/cms/src/web/Application.php at line 263 – yii\web\Application::handleRequest() 257 258 259 260 261 262 263 264 265 266 267 268 269 if (($response = $this->_processActionRequest($request)) !== null) { return $response; } // If we're still here, finally let Yii do it's thing. try { return parent::handleRequest($request); } catch (\Throwable $e) { $this->_unregisterDebugModule(); throw $e; } } 25. in /storage/av07909/www/public_html/vendor/yiisoft/yii2/base/Application.php at line 392 – craft\web\Application::handleRequest() 26. in /storage/av07909/www/public_html/public/index.php at line 26 – yii\base\Application::run() 20 21 22 23 24 25 26 define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production'); // ... // Load and run Craft /** @var craft\web\Application $app */ $app = require CRAFT_VENDOR_PATH . '/craftcms/cms/bootstrap/web.php'; $app->run(); $_GET = [ 'p' => 'galleries', ]; $_COOKIE = [ 'CRAFT_CSRF_TOKEN' => 'de4fcec126685a336ab358f5c445de3304f687ec300919214e70416dfbc9c7eca:2:{i:0;s:16:"CRAFT_CSRF_TOKEN";i:1;s:40:"O-NljFSUriL1cUcuEqnPKgFE7RpFlftv-vILTEFm";}', ]; 2021-12-01, 15:42:57 Apache Yii Framework/2.0.42.1