- Affected App
- WoltLab Suite Forum
Ein Fehler aus meinen Log-Dateien (ausgelöst durch einen Bot-Aufruf):
- Requested URL
- /forum/thread-amp/85192-firefox-und-seine-verr%C3%BCckten-favicons/
- Referrer
- Error Message
- Call to a member function getUserProfile() on bool
- Type
- Error
- File (Line)
- /www/htdocs/w0175a4b/camp-firefox.de/templates/compiled/2_wbb_1_ampThread.php (42)
- Stacktrace
-
- /www/htdocs/w0175a4b/camp-firefox.de/lib/system/template/TemplateEngine.class.php (334): include(…)
- /www/htdocs/w0175a4b/camp-firefox.de/lib/page/AbstractPage.class.php (323): wcf\system\template\TemplateEngine->display(…)
- /www/htdocs/w0175a4b/camp-firefox.de/lib/page/AbstractPage.class.php (114): wcf\page\AbstractPage->show(…)
- /www/htdocs/w0175a4b/camp-firefox.de/lib/system/request/Request.class.php (83): wcf\page\AbstractPage->__run(…)
- /www/htdocs/w0175a4b/camp-firefox.de/lib/system/request/RequestHandler.class.php (107): wcf\system\request\Request->execute(…)
- /www/htdocs/w0175a4b/camp-firefox.de/forum/index.php (9): wcf\system\request\RequestHandler->handle(…)
Zeile 42 besagter Datei ist:
Und hier mit etwas mehr umgebendem Code:
PHP
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "DiscussionForumPosting",
"mainEntityOfPage": "<?=$this->pluginObjects['wcf\system\template\plugin\EncodeJSONModifierTemplatePlugin']->execute([$this->v['regularCanonicalURL']], $this);?>",
"headline": "<?=$this->pluginObjects['wcf\system\template\plugin\EncodeJSONModifierTemplatePlugin']->execute([$this->v['thread']->topic], $this);?>",
"datePublished": "<?=$this->pluginObjects['wcf\system\template\plugin\DateModifierTemplatePlugin']->execute([$this->v['thread']->time,'c'], $this);?>",
"dateModified": "<?=$this->pluginObjects['wcf\system\template\plugin\DateModifierTemplatePlugin']->execute([$this->v['thread']->time,'c'], $this);?>",
"author": {
"@type": "Person",
"name": "<?=$this->pluginObjects['wcf\system\template\plugin\EncodeJSONModifierTemplatePlugin']->execute([$this->v['thread']->username], $this);?>"
},
<?php if ($this->v['firstPost']->getUserProfile()->getAvatar()) { ?>
"image": "<?=$this->pluginObjects['wcf\system\template\plugin\EncodeJSONModifierTemplatePlugin']->execute([$this->v['firstPost']->getUserProfile()->getAvatar()->getURL()], $this);?>",
<?php } ?>
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": "https://schema.org/ReplyAction",
"userInteractionCount": <?=$this->v['thread']->replies;?>
},
"publisher": {
"@type": "Organization",
"name": "<?=wcf\util\StringUtil::encodeHTML($this->pluginObjects['wcf\system\template\plugin\LanguageModifierTemplatePlugin']->execute([PAGE_TITLE], $this));?>",
"logo": {
"@type": "ImageObject",
"url": "<?=$this->pluginObjects['wcf\system\template\plugin\EncodeJSONModifierTemplatePlugin']->execute([$this->v['__wcf']->getStyleHandler()->getStyle()->getPageLogo()], $this);?>",
"width": <?=$this->v['__wcf']->getStyleHandler()->getStyle()->getVariable('pageLogoWidth');?>,
"height": <?=$this->v['__wcf']->getStyleHandler()->getStyle()->getVariable('pageLogoHeight');?>
}
}
}
</script>
Display More
Die Nicht-AMP-Version wirft keinen Fehler. Dort erscheint der folgende Hinweis:
QuoteDieses Thema enthält keine Beiträge mehr. Du kannst dieses Thema löschen.