Fixed Cannot determine visibility of XFMG\Entity\Rating (Debug mode: news_feed_macros template error)

Affected version
XFMG 2.1.4

marquisite

Well-known member
With debug mode enabled, a template error relating to XFMG\Entity\Rating is generated when viewing What's new -> Lastest activity.

Template public:news_feed_macros: Could not determine content visibility; defaulted to true - please override (src/XF/NewsFeed/AbstractHandler.php:56)

A portion of the stack trace:
Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Could not deter...', '/volume1/web/xf...', 56, Array)
#1 src/XF/NewsFeed/AbstractHandler.php(56): trigger_error('Could not deter...', 512)
#2 src/XF/Entity/NewsFeed.php(49): XF\NewsFeed\AbstractHandler->contentIsVisible(Object(XFMG\Entity\Rating), NULL)
#3 [internal function]: XF\Entity\NewsFeed->isVisible()
In addition, when a media item is in a soft deleted state, the news feed item styling for a media rating is inconsistent with a standard media comment:
xenforo-2-1-xfmg-media-item-soft-deleted-rating-styling-issue.gif
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XFMG release (2.1.5).

Change log:
Prevent a template warning from displaying when viewing the news feed which contains a rating feed item for a deleted media/album.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top