Giray Posted June 7, 2022 Share Posted June 7, 2022 I keep getting different template errors that I would never get before. Any ideas on this one. See image: This is the error log: {{if $announcements = \IPS\core\Announcements\Announcement::loadAllByLocation('content')}} <div class='cAnnouncementsContent'> {{foreach $announcements as $announcement}} <div class='cAnnouncementContentTop ipsAnnouncement ipsMessage_{$announcement->color} ipsType_center'> {{if $announcement->type == \IPS\core\Announcements\Announcement::TYPE_CONTENT}} <a href='{$announcement->url()}' data-ipsDialog data-ipsDialog-title="{$announcement->title}">{$announcement->title}</a> {{elseif $announcement->type == \IPS\core\Announcements\Announcement::TYPE_URL}} <a href='{$announcement->url}' target="_blank" rel='noopener'>{$announcement->title}</a> {{else}} <span>{$announcement->title}</span> {{endif}} </div> {{endforeach}} </div> {{endif}} Link to comment Share on other sites More sharing options...
Luuuk Posted June 7, 2022 Share Posted June 7, 2022 (edited) Hi, Similar error was reported twice: Solved: Unsolved: [announcementContentTop on the default theme. announcementTop + announcementContentTop on Ehren's theme.] Edited June 7, 2022 by Luuuk Link to comment Share on other sites More sharing options...
Giray Posted June 7, 2022 Author Share Posted June 7, 2022 Thanks @Luuuk but, just to make sure I'm reading it right, it's currently unsolved, correct? Link to comment Share on other sites More sharing options...
Luuuk Posted June 7, 2022 Share Posted June 7, 2022 First topic is solved - the error was Redis related. The second (mine) topic is not because I'm on Windows Server. Link to comment Share on other sites More sharing options...
Marc Posted June 7, 2022 Share Posted June 7, 2022 What you posted there is not an error log, it's a template. Please try disabling template caching if you have that enabled. Also, if you need support on a stock item, please post in the support forum Giray 1 Link to comment Share on other sites More sharing options...
Giray Posted June 7, 2022 Author Share Posted June 7, 2022 Just now, Marc Stridgen said: What you posted there is not an error log, it's a template. Please try disabling template caching if you have that enabled. Also, if you need support on a stock item, please post in the support forum Thank you Marc but I'm never quite sure where to post and not get into trouble 😇 FYI, I believe my caching is already disabled? Posting image here just to make sure I have it right? SeNioR- 1 Link to comment Share on other sites More sharing options...
Marc Posted June 7, 2022 Share Posted June 7, 2022 System->Settings->Advanced Configuration, template caching is what you need to disable. If you are unsure, post in the support area. We will move it here if its unsupported. SeNioR- 1 Link to comment Share on other sites More sharing options...
Giray Posted June 7, 2022 Author Share Posted June 7, 2022 Thanks for your patience. Done, now disabled (was enabled). I'll wait and see what happens. Thx again. Link to comment Share on other sites More sharing options...
Luuuk Posted June 7, 2022 Share Posted June 7, 2022 2 minutes ago, Giray said: I'll wait and see what happens. You can check if the error is still there by pasting in your browser a URL pointing to a non-existent attachment like: https://YourSite/applications/core/interface/file/attachment.php?id=0 SeNioR- 1 Link to comment Share on other sites More sharing options...
Giray Posted June 7, 2022 Author Share Posted June 7, 2022 1 hour ago, Luuuk said: You can check if the error is still there by pasting in your browser a URL pointing to a non-existent attachment like: https://YourSite/applications/core/interface/file/attachment.php?id=0 Unfortunately it is. Just tried what you suggested and I still get: [[Template core/front/global/announcementContentTop is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] Link to comment Share on other sites More sharing options...
Adriano Faria Posted June 7, 2022 Share Posted June 7, 2022 1 minute ago, Giray said: Unfortunately it is. Just tried what you suggested and I still get: [[Template core/front/global/announcementContentTop is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] What shows up in the logs? Link to comment Share on other sites More sharing options...
Daniel F Posted June 7, 2022 Share Posted June 7, 2022 Since I'm already in your ACP and working on your other issue, I'll take this one too:) Giray 1 Link to comment Share on other sites More sharing options...
Giray Posted June 7, 2022 Author Share Posted June 7, 2022 Log TypeError: get_class(): Argument #1 ($object) must be of type object, null given in /home/myaccount/public_html/applications/core/sources/Announcements/Announcement.php:198 Stack trace: #0 /home/myaccount/public_html/system/Theme/Theme.php(880) : eval()'d code(104): IPS\core\Announcements\_Announcement::loadAllByLocation('content') #1 /home/myaccount/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->announcementContentTop() #2 /home/myaccount/public_html/system/Theme/Theme.php(880) : eval()'d code(18644): IPS\Theme\_SandboxedTemplate->__call('announcementCon...', Array) #3 /home/myaccount/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer('header', 'horizontal') #4 /home/myaccount/public_html/system/Theme/Theme.php(880) : eval()'d code(6690): IPS\Theme\_SandboxedTemplate->__call('widgetContainer', Array) #5 /home/myaccount/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate('d09378790251aab...', '\n\n<section id='...', Array) #6 /home/myaccount/public_html/system/Output/Output.php(748): IPS\Theme\_SandboxedTemplate->__call('globalTemplate', Array) #7 /home/myaccount/public_html/init.php(913) : eval()'d code(26): IPS\_Output->error('We could not lo...', '2S328/1', 404, '', Array, NULL, NULL) #8 /home/myaccount/public_html/applications/core/interface/file/attachment.php(136): IPS\cms_hook_Output->error('node_error', '2S328/1', 404, '') #9 {main} And backtrace #0 /home/myaccount/public_html/system/Theme/SandboxedTemplate.php(71): IPS\_Log::log(Object(TypeError), 'template_error') #1 /home/myaccount/public_html/system/Theme/Theme.php(880) : eval()'d code(18644): IPS\Theme\_SandboxedTemplate->__call('announcementCon...', Array) #2 /home/myaccount/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer('header', 'horizontal') #3 /home/myaccount/public_html/system/Theme/Theme.php(880) : eval()'d code(6690): IPS\Theme\_SandboxedTemplate->__call('widgetContainer', Array) #4 /home/myaccount/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate('d09378790251aab...', '\n\n<section id='...', Array) #5 /home/myaccount/public_html/system/Output/Output.php(748): IPS\Theme\_SandboxedTemplate->__call('globalTemplate', Array) #6 /home/myaccount/public_html/init.php(913) : eval()'d code(26): IPS\_Output->error('We could not lo...', '2S328/1', 404, '', Array, NULL, NULL) #7 /home/myaccount/public_html/applications/core/interface/file/attachment.php(136): IPS\cms_hook_Output->error('node_error', '2S328/1', 404, '') #8 {main} Just now, Daniel F said: Since I'm already in your ACP and working on your other issue, I'll take this one too:) I thank you... while blushing 😉 Too kind!! Link to comment Share on other sites More sharing options...
Daniel F Posted June 7, 2022 Share Posted June 7, 2022 SeNioR-, Giray, abobader and 1 other 3 1 Link to comment Share on other sites More sharing options...
Giray Posted June 7, 2022 Author Share Posted June 7, 2022 1 minute ago, Daniel F said: I've always wondered if that tape works. Anyway, checked and, indeed, nicely fixed. THANK YOU. Link to comment Share on other sites More sharing options...
Luuuk Posted June 7, 2022 Share Posted June 7, 2022 @Daniel F Could you tell me how it has been fixed? SeNioR- 1 Link to comment Share on other sites More sharing options...
Stuart Silvester Posted June 7, 2022 Share Posted June 7, 2022 8 hours ago, Luuuk said: @Daniel F Could you tell me how it has been fixed? It was a code fix, specifically it was related to the use of Pages when using the external dispatcher. The fix will be included in an upcoming release. Giray and abobader 2 Link to comment Share on other sites More sharing options...
Giray Posted June 13, 2022 Author Share Posted June 13, 2022 Just found a new template error. Not sure if it's related to my previous template errors and fixed in upcoming release or not. If I try to show an activity stream, e.g. my unread content, I get: [[Template core/front/streams/streamItems is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] Is there some kind of temporary fix? Link to comment Share on other sites More sharing options...
Giray Posted June 13, 2022 Author Share Posted June 13, 2022 (edited) For quick reference, this is the template content. See anything...? Note that I just tried with the default IPS theme and the problem persists. Last point, this just suddenly started happening today, with no other changes made. {{$currentSeparator = NULL;}} {{if \count( $results )}} {{foreach $results as $result}} {{if $result !== NULL}} {{if $showTimeSeparators}} {{if $currentSeparator != 'earlier'}} {{$separator = $result->streamSeparator( $sort == 'date' );}} {{if $currentSeparator != $separator}} <li class='ipsStreamItem_time' data-timeType='{$separator}'>{lang="$separator"}</li> {{$currentSeparator = $separator;}} {{endif}} {{endif}} {{endif}} {$result->html( $view, $sort != 'date', TRUE )|raw} {{endif}} {{endforeach}} {{else}} {{if ! ( \IPS\Request::i()->isAjax() and isset( \IPS\Request::i()->before ) )}} <li class='ipsBox_alt ipsType_center ipsPad' data-role="streamNoResultsMessage"> <p class='ipsType_reset ipsType_light ipsType_normal'> {lang="stream_no_results"} </p> </li> {{endif}} {{endif}} Edited June 13, 2022 by Giray Link to comment Share on other sites More sharing options...
Daniel F Posted June 13, 2022 Share Posted June 13, 2022 It's not the template, it's the underlaying code in the announcement class which was causing this. Link to comment Share on other sites More sharing options...
Giray Posted June 13, 2022 Author Share Posted June 13, 2022 11 minutes ago, Daniel F said: It's not the template, it's the underlaying code in the announcement class which was causing this. Thank you @Daniel F. And do you think that is what is causing this new error or should I be looking elsewhere? Link to comment Share on other sites More sharing options...
Daniel F Posted June 13, 2022 Share Posted June 13, 2022 4 minutes ago, Giray said: Thank you @Daniel F. And do you think that is what is causing this new error or should I be looking elsewhere? Yes, it's this one: Link to comment Share on other sites More sharing options...
Giray Posted June 13, 2022 Author Share Posted June 13, 2022 Thanks. Now the question you can't answer... fix timeframe? This one is pretty bad for anyone using this function which on my board happens to be FRONT and center 😉 I've made it into a 'see everything' button. Link to comment Share on other sites More sharing options...
Giray Posted June 13, 2022 Author Share Posted June 13, 2022 Any chance of getting a patch? Link to comment Share on other sites More sharing options...
Giray Posted June 14, 2022 Author Share Posted June 14, 2022 Would the 4.7.0 Beta 6 have this fix? Link to comment Share on other sites More sharing options...
Recommended Posts