? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
23 May 2017

Pull Request for Issue #16203

PHP Notice: Undefined property: JCategoryNode::$rating_count in ../plugins/content/vote/tmpl/rating.php on line 45

Summary of Changes

Define $rating_count

Testing Instructions

Create a Blog item menu, create some article for the blog. Enable Show Voting in the blog menu item.
Try to open in frontend the blog and see the php error log:

Patch and test again

avatar infograf768 infograf768 - open - 23 May 2017
avatar infograf768 infograf768 - change - 23 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2017
Category Front End Plugins
avatar AlexRed
AlexRed - comment - 23 May 2017

I have tested this item successfully on 5529fc6

Patch ok for me


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16204.

avatar AlexRed AlexRed - test_item - 23 May 2017 - Tested successfully
avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

Looking at this, is voting on a blog actually even needed? I see no way to "vote" on the actual blog view... I can see where to vote on the articles (when viewing the article) but I see no way to enable people to vote on a blog view.

The stars are not clickable, and there is no other way to vote on the blog?

screen shot 2017-05-23 at 12 10 04

avatar brianteeman
brianteeman - comment - 23 May 2017

you cannot vote on a blog - correct
you should be able to see the results though

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

Results of what?
I see stars under blog heading which show and can't be voted on and also the result stars from an article

So why do stars appear in the blog heading?

Sent from my iPhone

On 23 May 2017, at 12:19, Brian Teeman notifications@github.com wrote:

you cannot vote on a blog - correct
you should be able to see the results though


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar brianteeman
brianteeman - comment - 23 May 2017

the results of the votes that people have made on the article view

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

I have one article in my blog view, but if you enable voting on the blog menu item you get a strange set of stars ABOVE the article

It's that set of stars that can be changed/voted on - I'm not sure why you are allowed to have voting enabled there...

Sent from my iPhone

On 23 May 2017, at 12:28, Brian Teeman notifications@github.com wrote:

the results of the votes that people have made on the article view


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

here is my full page after creating a blog view, with a single article, and enabling Show Voting on the MENU ITEM for the blog (as this PR says to do)

screen shot 2017-05-23 at 12 44 30

What Im confused about is that set of stars under the error message. Im guessing that the reason you are getting an error message is that Voting on a BLOG VIEW itself is "not a thing" (as there is also no way to register my vote, and what then am I actually voting on!?) .

The vote stars for the ARTICLE are shown, this is correct, and then if I click into the article I see how I can vote for that article.

But no where can I see the purpose, or way to vote on the actual Blog View itself (under the error).

Im guessing the reason we get a PHP warning/error there is because this simply should not be showing voting stars in that location!

avatar brianteeman
brianteeman - comment - 23 May 2017

@PhilETaylor I hope these two screenshots explain it for you

blog view

screenshotr13-01-16

full view

screenshotr13-01-29

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

NO!

In your Blog View, ABOVE the "Blog Article" title I see 5 stars in my install. Thats where the error message shows too.

avatar mbabker
mbabker - comment - 23 May 2017

Separate issue but I'm fairly sure the fix for that is going to be checking the full context and not just if its first part is for com_content.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 May 2017

I have tested this item successfully on 5529fc6


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16204.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 23 May 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 23 May 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 May 2017

RTC after two successful tests.

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

Im sorry but I object to the RTC.

Adding more error suppression is NOT the correct fix!

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

Separate issue but I'm fairly sure the fix for that is going to be checking the full context and not just if its first part is for com_content.

Yes, the correct fix is

if ($context=='com_content.categories')
{
	return;
}

before the $rating = line, and then remove the error suppressors...

avatar PhilETaylor
PhilETaylor - comment - 23 May 2017

PR submitted to replace this one here #16206

avatar infograf768 infograf768 - change - 23 May 2017
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2017-05-23 13:43:29
Closed_By infograf768
Labels Added: ?
avatar infograf768 infograf768 - close - 23 May 2017

Add a Comment

Login with GitHub to post a comment