Content Ratings

Content Ratings [Paid] 2.7.6

No permission to buy ($35.00)
This add-ons adds the "Manage content ratings" admin permission, and respects it on access to the admin bits for this add-on
 
  • Like
Reactions: DL6
Bug:
Code:
Server error log
ErrorException: [E_NOTICE] Undefined offset: 1 src/XF/Mvc/Entity/AbstractCollection.php:44
Generated by: Unknown account Feb 18, 2018 at 8:16 AM
Stack trace
#0 src/XF/Mvc/Entity/AbstractCollection.php(44): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nginx/dom...', 44, Array)
#1 src/addons/SV/ContentRatings/Entity/Ratable.php(332): XF\Mvc\Entity\AbstractCollection->offsetGet(1)
#2 src/XF/Mvc/Entity/Entity.php(142): SV\ContentRatings\XF\Entity\Post->getSvCategorizedRatings()
#3 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('sv_categorized_...')
#4 src/addons/SV/ContentRatings/XF/ControllerPlugin/Like.php(281): XF\Mvc\Entity\Entity->__get('sv_categorized_...')
#5 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(129): SV\ContentRatings\XF\ControllerPlugin\Like->actionRatings(Object(LiamW\NicknameToGuests\XF\Entity\Post), Array, Array, Object(XF\Phrase), Array)
#6 src/XF/Mvc/Dispatcher.php(249): SV\ContentRatings\Pub\Controller\Ratings->actionList(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\ContentRatin...', 'List', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\ContentRatings\Pub\Controller\Ratings), NULL)
#8 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#10 src/XF.php(328): XF\App->run()
#11 index.php(13): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(74) "/rating/list?content_type=post&content_id=325469&rating_type_category_id=0"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/rating/list"] => string(0) ""
    ["content_type"] => string(4) "post"
    ["content_id"] => string(6) "325469"
    ["rating_type_category_id"] => string(1) "0"
  }
  ["_POST"] => array(0) {
  }
}
Code:
Server error log
ErrorException: [E_NOTICE] Trying to get property 'rating_type_category_id' of non-object src/addons/SV/ContentRatings/Entity/Ratable.php:334
Generated by: Unknown account Feb 18, 2018 at 8:16 AM
Stack trace
#0 src/addons/SV/ContentRatings/Entity/Ratable.php(334): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/nginx/dom...', 334, Array)
#1 src/XF/Mvc/Entity/Entity.php(142): SV\ContentRatings\XF\Entity\Post->getSvCategorizedRatings()
#2 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('sv_categorized_...')
#3 src/addons/SV/ContentRatings/XF/ControllerPlugin/Like.php(281): XF\Mvc\Entity\Entity->__get('sv_categorized_...')
#4 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(129): SV\ContentRatings\XF\ControllerPlugin\Like->actionRatings(Object(LiamW\NicknameToGuests\XF\Entity\Post), Array, Array, Object(XF\Phrase), Array)
#5 src/XF/Mvc/Dispatcher.php(249): SV\ContentRatings\Pub\Controller\Ratings->actionList(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\ContentRatin...', 'List', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\ContentRatings\Pub\Controller\Ratings), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => string(74) "/rating/list?content_type=post&content_id=325469&rating_type_category_id=0"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/rating/list"] => string(0) ""
    ["content_type"] => string(4) "post"
    ["content_id"] => string(6) "325469"
    ["rating_type_category_id"] => string(1) "0"
  }
  ["_POST"] => array(0) {
  }
}
 
Bug:
Code:
Server error log
ErrorException: [E_NOTICE] Undefined offset: 1 src/XF/Mvc/Entity/AbstractCollection.php:44
Generated by: Unknown account Feb 18, 2018 at 8:16 AM
Stack trace
#0 src/XF/Mvc/Entity/AbstractCollection.php(44): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nginx/dom...', 44, Array)
#1 src/addons/SV/ContentRatings/Entity/Ratable.php(332): XF\Mvc\Entity\AbstractCollection->offsetGet(1)
#2 src/XF/Mvc/Entity/Entity.php(142): SV\ContentRatings\XF\Entity\Post->getSvCategorizedRatings()
#3 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('sv_categorized_...')
#4 src/addons/SV/ContentRatings/XF/ControllerPlugin/Like.php(281): XF\Mvc\Entity\Entity->__get('sv_categorized_...')
#5 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(129): SV\ContentRatings\XF\ControllerPlugin\Like->actionRatings(Object(LiamW\NicknameToGuests\XF\Entity\Post), Array, Array, Object(XF\Phrase), Array)
#6 src/XF/Mvc/Dispatcher.php(249): SV\ContentRatings\Pub\Controller\Ratings->actionList(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\ContentRatin...', 'List', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\ContentRatings\Pub\Controller\Ratings), NULL)
#8 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#10 src/XF.php(328): XF\App->run()
#11 index.php(13): XF::runApp('XF\\Pub\\App')
#12 {main}
Request state
array(4) {
  ["url"] => string(74) "/rating/list?content_type=post&content_id=325469&rating_type_category_id=0"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/rating/list"] => string(0) ""
    ["content_type"] => string(4) "post"
    ["content_id"] => string(6) "325469"
    ["rating_type_category_id"] => string(1) "0"
  }
  ["_POST"] => array(0) {
  }
}
Code:
Server error log
ErrorException: [E_NOTICE] Trying to get property 'rating_type_category_id' of non-object src/addons/SV/ContentRatings/Entity/Ratable.php:334
Generated by: Unknown account Feb 18, 2018 at 8:16 AM
Stack trace
#0 src/addons/SV/ContentRatings/Entity/Ratable.php(334): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/nginx/dom...', 334, Array)
#1 src/XF/Mvc/Entity/Entity.php(142): SV\ContentRatings\XF\Entity\Post->getSvCategorizedRatings()
#2 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('sv_categorized_...')
#3 src/addons/SV/ContentRatings/XF/ControllerPlugin/Like.php(281): XF\Mvc\Entity\Entity->__get('sv_categorized_...')
#4 src/addons/SV/ContentRatings/Pub/Controller/Ratings.php(129): SV\ContentRatings\XF\ControllerPlugin\Like->actionRatings(Object(LiamW\NicknameToGuests\XF\Entity\Post), Array, Array, Object(XF\Phrase), Array)
#5 src/XF/Mvc/Dispatcher.php(249): SV\ContentRatings\Pub\Controller\Ratings->actionList(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('SV\\ContentRatin...', 'List', 'html', Object(XF\Mvc\ParameterBag), '', Object(SV\ContentRatings\Pub\Controller\Ratings), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => string(74) "/rating/list?content_type=post&content_id=325469&rating_type_category_id=0"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/rating/list"] => string(0) ""
    ["content_type"] => string(4) "post"
    ["content_id"] => string(6) "325469"
    ["rating_type_category_id"] => string(1) "0"
  }
  ["_POST"] => array(0) {
  }
}
Have you recently deleted a rating type? It should be executing a cleanup task.

I've identified what is going wrong in this particular case, but wanted to ensure I better understood how it happened.
 
Have you recently deleted a rating type? It should be executing a cleanup task.

I've identified what is going wrong in this particular case, but wanted to ensure I better understood how it happened.
I have just been creating new rating types and I have been editing current rating types. I haven't deleted any ratings. I have disable some though. Hope this helps.

Itworx4me
 
Broke after upgrade:
Code:
Server error log
Exception: Could not find class SV\ContentRatings\XF\Template\Templater when attempting to extend XF\Template\Templater src/XF/Extension.php:174
Generated by: Unknown account Feb 18, 2018 at 4:44 PM
Stack trace
#0 src/XF/App.php(2364): XF\Extension->extendClass('XF\\Template\\Tem...', NULL)
#1 src/XF/App.php(1424): XF\App->extendClass('\\XF\\Template\\Te...')
#2 src/XF/App.php(1082): XF\App->setupTemplaterObject(Object(XF\Container), '\\XF\\Template\\Te...')
#3 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#4 src/XF/App.php(2650): XF\Container->offsetGet('templater')
#5 src/XF/Pub/App.php(348): XF\App->templater()
#6 src/XF/Mvc/Dispatcher.php(280): XF\Pub\App->preRender(Object(XF\Mvc\Reply\View), 'html')
#7 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#8 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => string(46) "/threads/pepsi-nightfire-fridays-results.1071/"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/pepsi-nightfire-fridays-results_1071/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Thanks,
Itworx4me
 
@Itworx4me please ensure the files are uploaded properly.

Also, if this issue only briefly occurs when the add-on is uploaded this is semi-expected. As depending on how you upload the files, the file may briefly not exist under that filename.
 
@Itworx4me please ensure the files are uploaded properly.

Also, if this issue only briefly occurs when the add-on is uploaded this is semi-expected. As depending on how you upload the files, the file may briefly not exist under that filename.
I haven't had any other errors since upgrade.

Thanks,
Itworx4me
 
  • Like
Reactions: Xon
I might just be blind but is there currently any way to remove ratings/remove people's permission to rate? Unfortunately I have a very angry community that does a lot of "revenge rating", where this sort of feature is really important.
 
I might just be blind but is there currently any way to remove ratings/remove people's permission to rate? Unfortunately I have a very angry community that does a lot of "revenge rating", where this sort of feature is really important.
Content > Rating Types > Edit a rating

There's a 2nd tab called 'Restrictions' where you can specify which user groups can use the rating.

You can use the standard XF forum permission to 'Like Posts' if you want to remove the ability to use any ratings.
 
You can use the standard XF forum permission to 'Like Posts' if you want to remove the ability to use any ratings.
Ah, that's very good to know, thanks. Only thing missing then is the ability to remove ratings I guess?
 
Is it possible to limit certain ratings only for some content?
For example, I want to create reactions for a specific forum but I do not want them to be shown in conversations and profile messages.
if it's not possible, could it be implemented at some point?

Thank you
 
Top Bottom