bleistivt/yaga

Fatal Error in Gdn_Controller.fetchView();

Closed this issue · 2 comments

Hi bleistivt,
i installed your yaga plugin,
when i clic on a badge on https://dev.routeur4g.fr/yaga/badges i have this error:

syntax error, unexpected ''span'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'
The error occurred on or near: /home/planning/sites/dev.routeur4g.fr/plugins/yaga/views/yaga/badgedetail.php
26: Gdn::translate('Yaga.Badge.Earned').' '.
27: wrap(
28: //$dateFormatter->formatDate($userBadgeAward->DateInserted, true),
29: Gdn_Format::date($userBadgeAward->DateInserted, 'html')
30: 'span',
31: ['class' => 'DateReceived']
32: ),
33: 'div',
34: ['class' => 'EarnedThisBadge']
Backtrace:
[/home/planning/sites/dev.routeur4g.fr/library/core/class.controller.php:1386] Gdn_Controller->fetchView();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.pluggable.php:217] Gdn_Controller->xRender();
[/home/planning/sites/dev.routeur4g.fr/plugins/yaga/controllers/class.yagacontroller.php:188] Gdn_Pluggable->__call();
[/home/planning/sites/dev.routeur4g.fr/plugins/yaga/controllers/class.yagacontroller.php:147] YagaController->badgeDetail();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.dispatcher.php:872] YagaController->badges();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
[/home/planning/sites/dev.routeur4g.fr/index.php:29] Gdn_Dispatcher->dispatch();

i try to add a comma after Gdn_Format::date($userBadgeAward->DateInserted, 'html') but i have another fatal error :

Call to a member function formatDate() on null
The error occurred on or near: /home/planning/sites/dev.routeur4g.fr/plugins/yaga/views/yaga/badgedetail.php
51: wrap(
52: userPhoto($user).
53: userAnchor($user).' '.
54: wrap(
55: $dateFormatter->formatDate($award->DateInserted, true),
56: 'span',
57: ['class' => 'DateReceived']
58: ),
59: 'div',
Backtrace:
[/home/planning/sites/dev.routeur4g.fr/library/core/class.controller.php:782] PHP::include();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.controller.php:1386] Gdn_Controller->fetchView();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.pluggable.php:217] Gdn_Controller->xRender();
[/home/planning/sites/dev.routeur4g.fr/plugins/yaga/controllers/class.yagacontroller.php:188] Gdn_Pluggable->__call();
[/home/planning/sites/dev.routeur4g.fr/plugins/yaga/controllers/class.yagacontroller.php:147] YagaController->badgeDetail();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.dispatcher.php:872] YagaController->badges();
[/home/planning/sites/dev.routeur4g.fr/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
[/home/planning/sites/dev.routeur4g.fr/index.php:29] Gdn_Dispatcher->dispatch();

Thanks!
This was an oversight related to #13.
fixed in 0675088