Last modified: 2014-07-15 21:15:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69010, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67010 - Semantic Rating extension new version 1.2 generates bad html
Semantic Rating extension new version 1.2 generates bad html
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Other (Other open bugs)
unspecified
All All
: Unprioritized normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-23 23:00 UTC by Aditya Chaturvedi
Modified: 2014-07-15 21:15 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Error (95.44 KB, image/png)
2014-06-23 23:00 UTC, Aditya Chaturvedi
Details

Description Aditya Chaturvedi 2014-06-23 23:00:28 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.
Comment 1 Andre Klapper 2014-06-24 00:34:19 UTC
Not sure where this project's bugtracker is; CC'ing its maintainer.
Comment 2 Cindy Cicalese 2014-06-24 02:02:11 UTC
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.
Comment 3 Aditya Chaturvedi 2014-06-24 10:15:09 UTC
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.
Comment 4 Cindy Cicalese 2014-06-24 11:30:57 UTC
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!
Comment 5 Aditya Chaturvedi 2014-06-26 11:57:45 UTC
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).
Comment 6 Cindy Cicalese 2014-06-30 13:33:47 UTC
Thank you for the suggestion. I will try to add this feature soon.
Comment 7 Cindy Cicalese 2014-07-15 21:15:46 UTC
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!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links