- Posts: 431
- Thank you received: 19
Rating error helpful comment
3 years 2 hours ago - 3 years 2 hours ago #355355
by neo191987
Rating error helpful comment was created by neo191987
-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.1.17
-- Browser(s) name and version -- : Google Chrome 117
Hi, I'm getting the following error when rating a helpful comment: POST http://localhost/demo/index.php/component/hikashop/vote/save?tmpl=component 500 (Internal Server Error)
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.1.17
-- Browser(s) name and version -- : Google Chrome 117
Hi, I'm getting the following error when rating a helpful comment: POST http://localhost/demo/index.php/component/hikashop/vote/save?tmpl=component 500 (Internal Server Error)
Code:
0 round(): Argument #1 ($num) must be of type int|float, string given
Last edit: 3 years 2 hours ago by neo191987.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355359
by Philip
Replied by Philip on topic Rating error helpful comment
Hello,
Can you active the Joomla Debug at maximum level, and process a screenshot in order to show us everything?
This will allow us to better understand the error and his context.
Regards
Can you active the Joomla Debug at maximum level, and process a screenshot in order to show us everything?
This will allow us to better understand the error and his context.
Regards
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355373
by neo191987
Replied by neo191987 on topic Rating error helpful comment
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355376
by neo191987
Replied by neo191987 on topic Rating error helpful comment
fixed
components/com_hikashop/controllers/vote.php
row 72 and 73
changed to
components/com_hikashop/controllers/vote.php
row 72 and 73
Code:
$return['values'] = array('average' => round($voteClass->values['average'],2), 'rounded' => round($voteClass->values['average']), 'total' => $voteClass->values['total']);
$return['tooltip'] = JText::sprintf('HIKA_VOTE_TOOLTIP',round($voteClass->values['average'],2),$voteClass->values['total'],$element->vote_rating);
changed to
Code:
$return['values'] = array('average' => round((float)$voteClass->values['average'],2), 'rounded' => round((float)$voteClass->values['average']), 'total' => $voteClass->values['total']);
$return['tooltip'] = JText::sprintf('HIKA_VOTE_TOOLTIP',round((float)$voteClass->values['average'],2),$voteClass->values['total'],$element->vote_rating);
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355378
by nicolas
Replied by nicolas on topic Rating error helpful comment
Hi,
Thank you for the details and the patch. We've added it on our end.
For others with the issue, you can download the install package of HikaShop on our website and install it on yours and it will automatically apply the patch.
Thank you for the details and the patch. We've added it on our end.
For others with the issue, you can download the install package of HikaShop on our website and install it on yours and it will automatically apply the patch.
The following user(s) said Thank You: neo191987
Please Log in or Create an account to join the conversation.
Time to create page: 0.222 seconds