Last modified: 2014-07-15 21:15:46 UTC
Created attachment 15706 [details] Error The new release of semantic rating is broken i believe. It generated bad html at the place of rendering ratings. A quick check revealed that on reverting the last commit everything got restored. Sharing the screenshot.
Not sure where this project's bugtracker is; CC'ing its maintainer.
Thank you for the bug report. I am not seeing that behavior, but I am guessing that it has to do with the change to line 87 of SemanticRating.php. Could you please confirm that replacing that line, which in the new version is $return output; with return array($parser->insertStripItem($output, $parser->mStripState), 'noparse' => false, 'isHTML' => true); makes the problem go away? If so, I will change that back. Could you please also let me know what version of MediaWiki you are currently using? Thanks.
I am using mediawiki 1.23. You were right, the problem goes away on doing what you suggested. Also, I suggest that on line 66 on SemanticRating.class.php, the value of $cur_value should be 0 instead of 1 so that the default rating on submitting from a form is 0 and not 1. If this has been intentionally done due to UI purpose, then it will be good if you could please provide a configurable variable in the extension. If you will like, I will be happy to upstream this feature or you can just add it in the new release.
Thank you for the additional information. I have submitted a patch at https://gerrit.wikimedia.org/r/141673. Please review it. If it works for you, I will release it. Thanks!
Hi Cindy, it works fine for me. Thanks for adding the feature. In the future release I think it will be helpful if there is the option of set max number of stars as well (Example: If I want to have a rating system from 0 - 10 in place of 0 -5).
Thank you for the suggestion. I will try to add this feature soon.
Aditya, I have submitted a patch to allow a variable number of starts. Please review the patch at https://gerrit.wikimedia.org/r/#/c/145488/ if you get a chance. Thanks!