Werd aus der Fehlermeldung vom Server nicht schlau.
mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /home/r1sing/public_html/application/modules/events/views/admin/index/index.php:41, referer: https://www.r1sing.de/index.php/admin/training/index/index
mod_fcgid: stderr: Stack trace:, referer: https://www.r1sing.de/index.php/admin/training/index/index
mod_fcgid: stderr: #0 /home/r1sing/public_html/application/libraries/Ilch/View.php(22): include(), referer: https://www.r1sing.de/index.php/admin/training/index/index
mod_fcgid: stderr: #1 /home/r1sing/public_html/application/libraries/Ilch/Page.php(146): Ilch\\View->loadScript('/home/r1sing/pu...'), referer: https://www.r1sing.de/index.php/admin/training/index/index
mod_fcgid: stderr: #2 /home/r1sing/public_html/index.php(66): Ilch\\Page->loadPage(), referer: https://www.r1sing.de/index.php/admin/training/index/index
mod_fcgid: stderr: #3 {main}, referer: https://www.r1sing.de/index.php/admin/training/index/index
mod_fcgid: stderr: thrown in /home/r1sing/public_html/application/modules/events/views/admin/index/index.php on line 41, referer: https://www.r1sing.de/index.php/admin/training/index/index
verwendete ilch Version: 2.1.x
betroffene Homepage: www.r1sing.de
EDIT Fehler gefixt: Wieder mit dummyUser:
<h1><?=$this->getTrans('manage') ?></h1>
<?php if ($this->get('event') != ''): ?>
<form class="form-horizontal" method="POST" action="">
<?=$this->getTokenField() ?>
<div class="table-responsive">
<table class="table table-hover table-striped">
<colgroup>
<col class="icon_width">
<col class="icon_width">
<col class="icon_width">
<col class="col-lg-2">
<col class="col-lg-2">
<col>
</colgroup>
<thead>
<tr>
<th><?=$this->getCheckAllCheckbox('check_entries') ?></th>
<th></th>
<th></th>
<th><?=$this->getTrans('dateTime') ?></th>
<th><?=$this->getTrans('by') ?></th>
<th><?=$this->getTrans('title') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->get('event') as $event): ?>
<?php $userMapper = new \Modules\User\Mappers\User() ?>
<?php $user = $userMapper->getUserById($event->getUserId());
if (!$user) $user = $userMapper->getDummyUser();
?>
<tr>
<td><?=$this->getDeleteCheckbox('check_entries', $event->getId()) ?></td>
<td><a href="<?=$this->getURL('events/index/treat/id/'.$event->getId()) ?>" target="_blank" title="<?=$this->getTrans('edit') ?>"><i class="fas fa-edit text-success"></i></a></td>
<td><?=$this->getDeleteIcon(['action' => 'del', 'id' => $event->getId()]) ?></td>
<td>
<?=date('d.m.Y H:i', strtotime($event->getStart())) ?>
<?php if ($event->getEnd() !== '0000-00-00 00:00:00'): ?>
- <?=date('H:i', strtotime($event->getEnd())) ?>
<?php endif; ?>
</td>
<td>
<?php if ($event->getUserId()): ?>
<a href="<?=$this->getUrl('user/profil/index/user/'.$user->getId()) ?>" target="_blank"><?=$user->getName() ?></a>
<?php endif; ?>
</td>
<td><a href="<?=$this->getUrl('events/show/event/id/'.$event->getId()) ?>" target="_blank"><?=$this->escape($event->getTitle()) ?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?=$this->getListBar(['delete' => 'delete']) ?>
</form>
<?php else: ?>
<?=$this->getTrans('noEvent') ?>
<?php endif; ?>
Zuletzt modifiziert von magicmarkus am 03.04.2020 - 07:27:33


