Jump to content

[BUG 4.7.11.1] Template core>front>tables > rows doesn't work for Nodes without the Statistics Trait


teraßyte
Go to solution Solved by Marc,

Recommended Posts

The template /applications/core/dev/html/front/tables/rows.phtml contains this code on lines 46-55:

					{{if $row->unread()}}
						<a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
							{{if $row->containerWrapper() AND \in_array( $row->$idField, $row->containerWrapper()->contentPostedIn( null, $rowIds ) )}}
								<span class='ipsItemStatus'><i class="fa fa-star"></i></span>
							{{else}}
								<span class='ipsItemStatus'><i class="fa fa-circle"></i></span>
							{{endif}}
						</a>
					{{else}}
						{{if $row->containerWrapper() AND \in_array( $row->$idField, $row->containerWrapper()->contentPostedIn( null, $rowIds ) )}}
							<span class='ipsItemStatus ipsItemStatus_read ipsItemStatus_posted'><i class="fa fa-star"></i></span>
						{{else}}
							&nbsp;
						{{endif}}
					{{endif}}

The problem is that the template uses twice the function contentPostedIn() without checking if the Node/container class uses the \IPS\Node\Statistics trait.

 

Both IFs need this check added:

\IPS\IPS::classUsesTrait( $row->containerWrapper(), 'IPS\Node\Statistics' )

 

Link to comment
Share on other sites

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

Link to comment
Share on other sites

  • 4 weeks later...
  • Solution

This issue was resolved in our recent 4.7.12 release of the platform. Please upgrade to this version to resolve the bug, and if you experience any further issues with this, please let us know.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...