XF 1.5 An exception occurred: Argument 4 passed to XenForo_Template_Helper_Core::helperLikesHtml() must be

remiff

New member
What is the following error?

Error :

Code:
An exception occurred: Argument 4 passed to XenForo_Template_Helper_Core::helperLikesHtml() must be of the type array, boolean given, called in C:\Bitnami\wampstack-7.1.2-0\apache2\htdocs\xenfoor\library\XenForo\Template\Helper\Core.php on line 853 in C:\Bitnami\wampstack-7.1.2-0\apache2\htdocs\xenfoor\library\XenForo\Template\Helper\Core.php on line 411

Template :

HTML:
<div id="likes-{$review.review_id}"><xen:if is="{$message.likes}"><xen:include template="likes_summary" /></xen:if></div>
 
This was caused by a bad modification to the likes_summary template. Check that for customizations and revert it if necessary.
 
We also have this problem on one of our sites and the likes_summary template is the stock version and no template modifications are occurring in that template. Any ideas?

I can make the error go away by removing this line from the likes_summary template.

Code:
<xen:likes number="$message.likes" users="$message.likeUsers" url="$likesUrl" liked="$message.like_date" />
but obviously that isn't ideal..
 
It has also been caused by an add-on that may have caused invalid data to be logged in certain instances. Saying that, for the core content types, 1.5.15 should have extra protection.
 
It has also been caused by an add-on that may have caused invalid data to be logged in certain instances. Saying that, for the core content types, 1.5.15 should have extra protection.

I think the only add-on I have that alters likes is the Post Ratings add-on, but I've never received that message before.

Perhaps it is because of the extra protection in 1.5.15 in some way?
 
For fix it need change likes_summary template to

Code:
<xen:if is="{$message.likes} && {$message.likeUsers}">
    <xen:require css="likes_summary.css" />
    <div class="likesSummary secondaryContent">
        <span class="LikeText">
            <xen:likes number="$message.likes" users="$message.likeUsers" url="$likesUrl" liked="$message.like_date" />
        </span>
    </div>
</xen:if>
 
Back
Top Bottom