Keyword

Errors in rating stars since updating K2

  • Daily Deals UK
  • Daily Deals UK's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 7 months ago - 6 years 7 months ago #167638 by Daily Deals UK
Errors in rating stars since updating K2 was created by Daily Deals UK
Hi

The rating stars show fine in category view but in tag view they are blank. If you click to rate it then loads and looks normal.

Example Cat view (working) >> www.dailydealsblog.co.uk/voucher-codes

Example tag view >> www.dailydealsblog.co.uk/wowcher - once you rate it appears correctly.

I have a load of errors in the log such as....


[22-Apr-2018 21:00:55 Europe/London] PHP Notice: Undefined property: stdClass::$votingPercentage in /home/dailydealsblogco/public_html/components/com_k2/templates/default/tag.php on line 75

[22-Apr-2018 21:00:55 Europe/London] PHP Notice: Undefined property: stdClass::$numOfvotes in /home/dailydealsblogco/public_html/components/com_k2/templates/default/tag.php on line 82

These just repeat in the log for miles

I added the rating stars in ages ago and was all working fine until the update. here's the code:

<div class="catItemRatingBlock">
<span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span>
<div class="itemRatingForm">
<ul class="itemRatingList">
<li class="itemCurrentRating" id="itemCurrentRating<?php echo $item->id; ?>" style="width:<?php echo $item->votingPercentage; ?>%;"></li>
<li><a href="#" rel="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li>
<li><a href="#" rel="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li>
<li><a href="#" rel="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li>
<li><a href="#" rel="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li>
<li><a href="#" rel="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li>
</ul>
<div id="itemRatingLog<?php echo $item->id; ?>" class="itemRatingLog"><?php echo $item->numOfvotes; ?></div>
<div class="clr"></div>
</div>
Last edit: 6 years 7 months ago by Daily Deals UK.

Please Log in or Create an account to join the conversation.

  • Daily Deals UK
  • Daily Deals UK's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 7 months ago #167641 by Daily Deals UK
Replied by Daily Deals UK on topic Errors in rating stars since updating K2
Sorry ignore this, I forgot to add || $task == 'tag' to modals/item.php

All working now.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 7 months ago #167647 by Krikor Boghossian
Replied by Krikor Boghossian on topic Errors in rating stars since updating K2
Nice to hear that you sorted it out :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum