When upgrading to MW 1.35 and later, people will get a fatal error "PHP Unknown error: Cannot access non-public property Parser::$mStripState" when using the last tag to this extension, i.e., 4.0.1. Scott fixed the issue with this commit https://github.com/wikimedia/mediawiki-extensions-SemanticRating/commit/183b7a57f638b5ccd2f9834e43644db16fe9aa3d about three years ago. @Cindy.cicalese: . Please tag for a better sysadmin experience :) Thanks and cheers
Extension talk:Semantic Rating
Appearance
Is it possible to use it to vote for each separate page? or is it only one voting for entire wiki?
How to dis/allow voting for a particular usergroup?
Under "Displaying a Rating Using a Template Parameter" it says "For the form field defined in the example above...". What form field in what example? I think perhaps that text has been deleted.
In fact, it specifically states that it has been removed: "Removed form input, since it is now part of the Page Forms extension." You need to update your example.
Thanks for noticing that. It is now fixed.
Would this extension work with Cargo + Page Forms?
Yes, it would.
Let me just add that it's on the to-do list for Cargo to add a "Rating" data type - which would enable automatic display of stars within query results, among other things. The features of Semantic Rating would still be useful, though. I just figured I'd note that.
While we're on the subject, this extension could probably use a rename! But I think Cindy knows that already.
Yes, it could definitely use a rename! When time permits . . .
On our site we give the users an option to enter a rating. However, if they skip entering a rating, it saves the rating as 0. Is there anyway to save the rating as "N/A" or blank instead of 0 if not populated?
The latest version of Semantic Rating no longer defines a form input; the "rating" input type was moved to Page Forms. Depending on which versions you are using, this may be a Page Forms question...
I really like the extension from what I can read about it, but I can't seem to get it to work. Whenever I add SemanticRating to my mediawiki, I keep getting a blank page (no matter how often I update/reinitialise) I'm using mediawiki 1.28.0, SemanticMediawiki 2.4.5 and pageforms 4.0. Thanks in advance for anyone who points out my (probably obvious) error.
A blank page usually indicates an error on the server side. Have you checked your web server error log? It could be something as simple as a typo in your configuration file. Also, look at https://www.mediawiki.org/wiki/Manual:How_to_debug for some pointers on debugging.
Semantic Rating is installable on a 1.28 instance without issues. Make sure that you use Semantic Rating 4.0 and that you have Page Forms 4.x installed. Semantic Rating 3.0 will indeed either not register at all or cause a fatal.
I would like to use your extension, but I got this Fatal error Fatal error: Class 'SFFormInput' not found in ../extensions/SemanticRating/SemanticRatingFormInput.php on line 24
Maybe you can help me I am using mediawiki-1.28.0 Installed SemanticMediawiki 2.3.1 Installed Pageforms 4.02
The version of SemanticRating that you are using is not compatible with PageForms. You will need to use version 4.0 of SemanticRating.
Hey Cindy,
Thanks for the extension.
Can you please elaborate on this:
Displaying the Result of a Semantic Query as a Five Star Rating[edit]
Below are several more advanced examples that illustrate how this extension can be used.
Consider the case where users can review a wiki page. In this example, each review is itself a wiki page in category Reviews. Each review page has a property, Item, that is a link to the page being reviewed. Each review page also has a property, Rating, that has a value between 1 and 5 (with 0 being reserved for the case where no rating is assigned).
On the page being reviewed, the page's average rating can be displayed by the following query:
{{#rating:{{#ask:[[Category:Reviews]][[Item::{{FULLPAGENAME}}]]|?Rating|format=average}}}}
What is "review page has a property" here?
Is it the same as that of creating a property with a type, for templates?
How can I provide a link to page being reviewed to the property Item?
Also, what is {{FULLPAGENAME}}, is it any variable or the full name of the page that has to be reviewed?
Thanks for your time!
> What is "review page has a property" here?
For example, there may be a page named Review:100 that has the wikitext Item::Book:123 on it. That wikitext creates a property of type Page that links the review (Review:100) to the item being reviewed (Book:123). So, review page Review:100 has property Item on it.
> Is it the same as that of creating a property with a type, for templates?
I'm not sure about the "for templates" part of your question, but there may also be a page Property:Item that has the wikitext Has type::Page on it to declare the Item property to be of type Page. This is optional, since Page is the default type for properties.
> How can I provide a link to page being reviewed to the property Item?
That's the Item::Book:123 part described above.
> Also, what is Topic:Tfqw3t3r154d2gx8, is it any variable or the full name of the page that has to be reviewed?
It is the full name of the page being reviewed given by the magic word FULLPAGENAME. See https://www.mediawiki.org/wiki/Help:Magic_words#Page_names.
Alright, that helped me.
Thanks a lot Cindy.
Hey Cindy,
First of all i want to thank you for the extension, it really help me in the implementation of my wiki. Sab thing is I have trouble in the display of an input rating field. I installed and configured Semantic MediaWiki, Semantic Forms and then your extension like the guides said but when I try to add a form in a page for rating it (with the exemple on your extension page), it only display the word "Rating". But I can display the current rating of the page (which is 5 grey stars) with your exemple.
I hope i'm in the right place to ask my question, I'm a newbie in the world of wikis but I can't wait to learn about it.
I don't know what i have done wrong or if you can guide me but i thought it was worth a try.
Again, thank you for your time,
Qlymaxis
It is difficult to know what is going on without more information. What version of MediaWiki and the Semantic extensions are you using? It sounds like it could be a JavaScript issue. Are you seeing any error messages in the JavaScript console?
Yeah I can imagine that it's not possible to solve the problem just like that, but thank your for helping me anyway.
I'm using Media Wiki 1.26.2, Semantic Wiki 2.2, Semantic MediaWiki 2.3.1 and Semantic Forms 3.4.
There is no error message in the javascript console.
There is nothing more to do than adding the 2 lines in the page for :
1) showing a rating form (which isn't working in my wiki) and
2) display the rating ?
Thank you again for your time,
Qlymaxis
I am having the exact same problem; no solution yet.
I believe that version 3.0 of SemanticRating that was released last week will fix this issue. I removed some inline JavaScript that was handled differently by the MW 1.26 ResourceLoader than it was by MW 1.25. I only recently had the opportunity to test with MW 1.26 and saw the same problem. Please let me know if you continue to have issues with version 3.0.
I also converted to the new extension registration format, so you will need to switch to the wfLoadExtension('SemanticRating') style when you upgrade.