I fixed the 502 error.
When I visit my site it only shows background and logo image, it does not load any content or even the sign in header. I kept refreshing then it let me login in, but now all it says is "Something went wrong while trying to load the full version of this site."
If I turn off debug mode, then it doesnt show anything but logo and background.
This is the nginx error I have:
PHP message: PHP Notice: Undefined property: stdClass::$data in /var/www/keysdaggers/storage/views/8f944d1de7c4002376baa9793feebde9 on line 8
PHP message: PHP Warning: Invalid argument supplied for foreach() in /var/www/keysdaggers/storage/views/8f944d1de7c4002376baa9793feebde9 on line 8" while reading response header from upstream, client: 70.213.13.254, server: keys-daggers.org, request: "GET /?nojs=1 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.keysdaggers.sock:", host: "keys-daggers.org", referrer: "https://keys-daggers.org/"
Here is file code:
<?php
$url = app('Flarum\Forum\UrlGenerator');
?>
<div class="container">
<h2><?php echo e($translator->trans('core.views.index.all_discussions_heading')); ?></h2>
<ul>
<?php foreach($document->data as $discussion): ?>
<li>
<a href="<?php echo e($url->toRoute('discussion', [
'id' => $discussion->id . '-' . $discussion->attributes->slug
])); ?>">
<?php echo e($discussion->attributes->title); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<a href="<?php echo e($url->toRoute('index')); ?>?page=<?php echo e($page + 1); ?>"><?php echo e($translator->trans('core.views.index.next_page_button')); ?> &r$
</div>
https://keys-daggers.org
Any help would be greatly appreciated.
Might be related to:
https://discuss.flarum.org/d/4218-zend-stratigility-debug-message-after-composer-update/37