Jimi Wikman Posted October 22, 2022 Posted October 22, 2022 Anyone know what this means? I get them randomly, it seems for different blocks and sometimes for databases... Error: Undefined constant "IPS\Theme\raw" (0) #0 /home/jimiwikm/public_html/applications/cms/sources/Blocks/Block.php(280): IPS\Theme\class_cms_block_RecordFeed->jwsestandard3colblock() #1 /home/jimiwikm/public_html/system/Widget/Widget.php(234): IPS\cms\Blocks\_Block->getTemplate() #2 /home/jimiwikm/public_html/system/Content/Widget.php(522): IPS\_Widget->output() #3 /home/jimiwikm/public_html/applications/cms/widgets/RecordFeed.php(312): IPS\Content\_Widget->render() #4 /home/jimiwikm/public_html/applications/cms/sources/Blocks/Block.php(242): IPS\cms\widgets\_RecordFeed->render() #5 /home/jimiwikm/public_html/applications/cms/widgets/Blocks.php(143): IPS\cms\Blocks\_Block::display() #6 /home/jimiwikm/public_html/system/Widget/Widget.php(826): IPS\cms\widgets\_Blocks->render() #7 /home/jimiwikm/public_html/system/Widget/Widget.php(888): IPS\_Widget->_render() #8 /home/jimiwikm/public_html/uploads/template_7_80416a939542936b8d637f8c64a329cd_pages.php(172): IPS\_Widget->__toString() #9 /home/jimiwikm/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_cms_front_pages->widgetContainer() #10 /home/jimiwikm/public_html/applications/cms/sources/Theme/Theme.php(610) : eval()'d code(97): IPS\Theme\_SandboxedTemplate->__call() #11 /home/jimiwikm/public_html/applications/cms/sources/Pages/Page.php(2269): IPS\Theme\class_cms_page_page_builder->Start_Page() #12 /home/jimiwikm/public_html/applications/cms/modules/front/pages/page.php(116): IPS\cms\Pages\_Page->output() #13 /home/jimiwikm/public_html/applications/cms/modules/front/pages/page.php(43): IPS\cms\modules\front\pages\_page->view() #14 /home/jimiwikm/public_html/system/Dispatcher/Controller.php(118): IPS\cms\modules\front\pages\_page->manage() #15 /home/jimiwikm/public_html/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute() #16 /home/jimiwikm/public_html/system/Dispatcher/Dispatcher.php(153): IPS\cms\modules\front\pages\_page->execute() #17 /home/jimiwikm/public_html/index.php(13): IPS\_Dispatcher->run() #18 {main}
teraßyte Posted October 22, 2022 Posted October 22, 2022 The code inside the block must be missing something. Previous PHP version silently failed or threw warnings/noticed, but PHP8 is much more strict. Based on your log you have some wrong code inside a block called jwsestandard3colblock. IPS won't be able to help since it's either a custom block you made or some modification you installed. They'll move the topic in a different forum most likely, but if you post the block's code it's possible to have a look and see where the issue is. Jimi Wikman 1
Jimi Wikman Posted October 22, 2022 Author Posted October 22, 2022 That shuld make things a bit interesting then 🙂 {{if !empty( $records ) }} <h3 class='ipsWidget_title ipsType_reset'>{$title}</h3> <section class='jwse_BLOCK_sectionBG ipsType_normal ipsSpacer_both'> {{foreach $records as $record}} <article class="jwse_BLOCK_standard ThreeColBlock"> <div class="article_img"> {{if $record->isFutureDate() || $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1}} <div class="article_badges"> {{if $record->isFutureDate()}} <span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span> {{elseif $record->hidden() === -1}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span> {{elseif $record->hidden() === 1}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span> {{endif}} {{if $record->mapped('pinned')}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span> {{endif}} {{if $record->mapped('featured')}} <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span> {{endif}} </div> {{endif}} {{if $record->customFieldDisplayByKey('post-type', raw) == "video"}} <div class="record_postType"> <i class="far fa-play-circle"></i> </div> {{endif}} {{if $record->customFieldDisplayByKey('review_position', 'raw') != 'no'}} <div class="record_userReview {$record->container()->_title}_stars"> {{if $record::database()->options['reviews'] AND $record->averageReviewRating()>-1}} {template="rating" app="core" params="'small', $record->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of, $record->memberReviewRating()" group="global"} {{elseif $record->container()->allow_rating AND $record->averageRating()>-1}} {template="rating" app="core" params="'small', $record->averageRating(), \IPS\Settings::i()->reviews_rating_out_of, $record->memberRating()" group="global"} {{endif}} </div> {{endif}} {{if $record->record_image}} <a href="{$record->url('getNewComment')}"><img class="ipsImage" src="{file="$record->record_image" extension="cms_Records"}" alt="{$record->_title}"></a> {{else}} <img class="ipsImage" src="{media="365"}" alt="{$record->_title}"> {{endif}} </div> <div class="article_userPhoto"> {template="userPhoto" group="global" app="core" params="$record->author(), 'small'"} </div> <div class="article_content"> <h2 class="{$record->container()->_title}_h2"> {{if $record->unread()}} <a href='{$record->url('getNewComment')}'><span class='ipsItemStatus' data-ipsTooltip title="{lang="cms_unread_record"}"><i class="fas fa-eye"></i></span></a> {{endif}} <a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}">{wordbreak="$record->_title"}</a> <span class=""> {{if $record->prefix()}} {template="prefix" group="global" app="core" params="$record->prefix( TRUE ), $record->prefix()"} {{endif}} </span> </h2> </div> <div class="article_meta"> <div class="article_Comments"><i class="far fa-comment-alt"></i> {lang="num_comments" pluralize="$record->record_comments"}</div> <div class="article_views"> {lang="num_views_with_number" pluralize="$record->record_views"} </div> <div class="article_reaction ipsReactOverview"> <ul> {{foreach $record->reactBlurb() AS $key => $count}} <li>{{$reaction = \IPS\Content\Reaction::load( $key );}} <a href='{$record->url('showReactions')->setQueryString( 'reaction', $reaction->id )}' data-ipsDialog data-ipsDialog-title='{lang="see_who_reacted"}' data-ipsTooltip title='{lang="see_who_reacted_x" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'reaction_title_' . $reaction->id )"}'> <img class='reactionIcon' src='{file="$reaction->_icon" extension="core_Reaction"}' alt='{lang="reaction_title_{$reaction->id}"}'> </a></li> {{endforeach}} </ul> </div> </div> {{if $table and $table->canModerate()}} <div class='ipsDataItem_modCheck'> <span class='ipsCustomInput'> <input type='checkbox' data-role='moderation' name="moderate[{$record->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $record ) )"}" data-state='{{if $record->tableStates()}}{$record->tableStates()}{{endif}}'> <span></span> </span> </div> {{endif}} </article> {{endforeach}} </section> {{endif}}
teraßyte Posted October 22, 2022 Posted October 22, 2022 Here's the culprit: {{if $record->customFieldDisplayByKey('post-type', raw) == "video"}} Change it to: {{if $record->customFieldDisplayByKey('post-type', 'raw') == "video"}} Jimi Wikman 1
Jimi Wikman Posted October 22, 2022 Author Posted October 22, 2022 And this that breaks the editor? Fatal error: Declaration of IPS\Theme\Cache\hook220::imageFeed($images, $title, $orientation) must be compatible with IPS\Theme\Cache\class_gallery_front_widgets::imageFeed($images, $title, $orientation = 'vertical') in /home/jimiwikm/public_html/system/Theme/Theme.php(951) : eval()'d code on line 46 Looks like the whole gallery is dead...
Jimi Wikman Posted October 22, 2022 Author Posted October 22, 2022 The Gallery show the following error: Fatal error: Cannot use "parent" when current class scope has no parent in /home/jimiwikm/public_html/system/Theme/Theme.php(2703) : eval()'d code on line 52
Jimi Wikman Posted October 22, 2022 Author Posted October 22, 2022 what is wrong with this code then... {{if member.member_id}} <div class='ipsDataItem_icon ipsPos_top'> {{if $record->unread()}} <a href='{$record->url( 'getNewComment' )}' title='{lang="first_unread_post"}' class="jwseUnreadMarker" data-ipsTooltip> <span class='ipsItemStatus'><i class="fa {{if \in_array( $record->$idField, $iposted )}}fa-bookmark{{else}}fa-bell{{endif}}" style="var(--color-{$record->container()->_title});"></i></span> </a> <{{else}} {{if \in_array( $record->$idField, $iposted )}} <span class='jwsePosteddMarker ipsItemStatus ipsItemStatus_read ipsItemStatus_posted'><i class="fa fa-bookmark"></i></span> {{else}} {{endif}} {{endif}} </div> {{endif}}
teraßyte Posted October 22, 2022 Posted October 22, 2022 That's a problem with a plugin/widget and the PHP code itself needs to be updated. It's not a problem with the template. You need to contact the author of the plugin for an updated version. In case the developer is not available anymore your next best option would be to hire a different developer to fix/update the plugin for you: https://invisioncommunity.com/third-party/providers/ If you're not sure which plugin it is send me a PM and I can help you find it. Jimi Wikman 1
Recommended Posts