Content Ratings

Content Ratings [Paid] 2.7.6

No permission to buy ($35.00)
Ok, i have double-checked the permission. Admin is allowed to

[CR] Remove others reactions
Yes (Details)
Registered
No
Administrative
Yes

i see under a post:

Like-Icon {cnt} Dislike-Icon {cnt}

I can click these icons and a window opens. There is see the users and their reactions.
There is no delete/edit.
 
Ok, i have double-checked the permission. Admin is allowed to

[CR] Remove others reactions
Yes (Details)
Registered
No
Administrative
Yes

i see under a post:

Like-Icon {cnt} Dislike-Icon {cnt}

I can click these icons and a window opens. There is see the users and their reactions.
There is no delete/edit.
You have this permission twice in ACP. See under general moderator permissions and under forum moderator permissions
 
  • Like
Reactions: Xon
Yes, i have set it two times as
[CR] Remove others reactions

but there are no checkboxes. I have deisnatlled and installed. And now i will set up a clean forum to try it there.
 
@Xon
any thoughts about this error?
I have both last version installed (this addon and showcase)

Code:
Server error log
ErrorException: Template error: Method canRemoveOthersReaction is not callable on the given object (XenAddons\Showcase\Entity\Item) src/XF/Template/Templater.php:999
Generated by: Unknown account 10.11.2019. at 20:47
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canRemov...', '/home/nginx/dom...', 999, Array)
#1 src/XF/Template/Templater.php(999): trigger_error('Method canRemov...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/reaction_list.php(147): XF\Template\Templater->method(Object(XenAddons\Showcase\Entity\Item), 'canRemoveOthers...', Array)
#3 src/XF/Template/Templater.php(706): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\XF\Template\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s1/public/reaction_list.php(282): XF\Template\Templater->callMacro('reaction_list', 'reactions_list', Array, Array)
#5 src/XF/Template/Templater.php(1320): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\XF\Template\Templater), Array)
#6 src/addons/AddonsLab/GuestPosting/XF/Template/Templater.php(67): XF\Template\Templater->renderTemplate('reaction_list', Array, true)
#7 src/addons/AddonsLab/LinkChecker/XF/Template/Templater.php(89): AddonsLab\GuestPosting\XF\Template\Templater->renderTemplate('public:reaction...', Array, true)
#8 src/XF/Template/Template.php(24): AddonsLab\LinkChecker\XF\Template\Templater->renderTemplate('public:reaction...', Array)
#9 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Reaction\\Lis...', 'public:reaction...', Array)
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#15 src/XF.php(391): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(58) "/showcase/busenasta-rudnjaca-agaricus-bohusii.87/reactions"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/showcase/busenasta-rudnjaca-agaricus-bohusii_87/reactions"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
Feature Request: A rating only the thread starter can use! :) With this it would be possible to mark answers as helpful (and only by the starter, not by everyone else).
 
@Xon
any thoughts about this error?
I have both last version installed (this addon and showcase)

Code:
Server error log
ErrorException: Template error: Method canRemoveOthersReaction is not callable on the given object (XenAddons\Showcase\Entity\Item) src/XF/Template/Templater.php:999
Generated by: Unknown account 10.11.2019. at 20:47
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canRemov...', '/home/nginx/dom...', 999, Array)
#1 src/XF/Template/Templater.php(999): trigger_error('Method canRemov...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/reaction_list.php(147): XF\Template\Templater->method(Object(XenAddons\Showcase\Entity\Item), 'canRemoveOthers...', Array)
#3 src/XF/Template/Templater.php(706): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\XF\Template\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s1/public/reaction_list.php(282): XF\Template\Templater->callMacro('reaction_list', 'reactions_list', Array, Array)
#5 src/XF/Template/Templater.php(1320): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\XF\Template\Templater), Array)
#6 src/addons/AddonsLab/GuestPosting/XF/Template/Templater.php(67): XF\Template\Templater->renderTemplate('reaction_list', Array, true)
#7 src/addons/AddonsLab/LinkChecker/XF/Template/Templater.php(89): AddonsLab\GuestPosting\XF\Template\Templater->renderTemplate('public:reaction...', Array, true)
#8 src/XF/Template/Template.php(24): AddonsLab\LinkChecker\XF\Template\Templater->renderTemplate('public:reaction...', Array)
#9 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Reaction\\Lis...', 'public:reaction...', Array)
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#15 src/XF.php(391): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(58) "/showcase/busenasta-rudnjaca-agaricus-bohusii.87/reactions"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/showcase/busenasta-rudnjaca-agaricus-bohusii_87/reactions"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
Btw, this should be fixed in v2.1.2
 
SELECT data_key, data_value
FROM xf_data_registry
WHERE data_key IN ('svContentRatingsRT')

I have this query in my addon that shows just a page with some data.
How can i avoid this query, please?
 
Looks like i have some reactions without a post; i have no idea why and how.
Before i start killing them manualy, it would be nice if the cache building could kill/list/jumo over them?

Found them and kill them:
select reaction_content_id,xf_post.post_id FROM xf_reaction_content LEFT JOIN xf_post on xf_reaction_content.content_id=xf_post.post_id WHERE content_type='post' ORDER BY xf_post.post_id ASC
 
@Xon any help to manage ratings works with @Siropu addon Chat 2?
When I give rating (I can only default like) it show classic error page (Oops! We ran into some problems. The requested page could not be found.) but when I look at chat again, like is given.


Code:
Server error log
ErrorException: Template error: Cannot call method getRepository on a non-object (NULL) src/XF/Template/Templater.php:989
Generated by: tester2 02.12.2019. at 03:00
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Cannot call met...', '/home/nginx/dom...', 989, Array)
#1 src/XF/Template/Templater.php(989): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/sv_contentratings_macros.php(148): XF\Template\Templater->method(NULL, 'getRepository', Array)
#3 src/XF/Template/Templater.php(706): XF\Template\Templater->{closure}(Object(SV\BookmarkEssentials\XF\Template\Templater), Array, Array)
#4 src/XF/Template/Templater.php(784): XF\Template\Templater->callMacro('sv_contentratin...', 'rating_bar', Array, Array)
#5 src/addons/SV/ContentRatings/XF/Template/Templater.php(192): XF\Template\Templater->renderMacro('public:sv_conte...', 'rating_bar', Array)
#6 [internal function]: SV\ContentRatings\XF\Template\Templater->fnReactions(Object(SV\BookmarkEssentials\XF\Template\Templater), false, Object(Siropu\Chat\Entity\Message), 'chat/message/re...')
#7 src/XF/Template/Templater.php(941): call_user_func_array(Array, Array)
#8 src/XF/Template/Templater.php(911): XF\Template\Templater->func('reactions', Array, false)
#9 src/addons/Siropu/Chat/Service/Room/ActionLogger.php(33): XF\Template\Templater->fn('reactions', Array)
#10 src/addons/Siropu/Chat/Entity/Message.php(601): Siropu\Chat\Service\Room\ActionLogger->logMessageAction(Object(Siropu\Chat\Entity\Message))
#11 src/XF/Mvc/Entity/Entity.php(1208): Siropu\Chat\Entity\Message->_postSave()
#12 src/XF/Reaction/AbstractHandler.php(107): XF\Mvc\Entity\Entity->save()
#13 src/XF/Repository/Reaction.php(274): XF\Reaction\AbstractHandler->updateContentReactions(Object(Siropu\Chat\Entity\Message), Array, Array)
#14 src/addons/SV/ContentRatings/XF/Repository/Reaction.php(495): XF\Repository\Reaction->rebuildContentReactionCache('siropu_chat_roo...', 13, false, true)
#15 src/XF/Entity/ReactionContent.php(198): SV\ContentRatings\XF\Repository\Reaction->rebuildContentReactionCache('siropu_chat_roo...', 13, false)
#16 src/XF/Entity/ReactionContent.php(140): XF\Entity\ReactionContent->rebuildContentReactionCache()
#17 src/addons/SV/ContentRatings/XF/Entity/ReactionContent.php(180): XF\Entity\ReactionContent->_postSave()
#18 src/XF/Mvc/Entity/Entity.php(1208): SV\ContentRatings\XF\Entity\ReactionContent->_postSave()
#19 src/XF/Repository/Reaction.php(189): XF\Mvc\Entity\Entity->save()
#20 src/addons/SV/ContentRatings/XF/Repository/Reaction.php(863): XF\Repository\Reaction->insertReaction(1, 'siropu_chat_roo...', 13, Object(SV\BookmarkEssentials\XF\Entity\User), true, false)
#21 src/XF/Repository/Reaction.php(142): SV\ContentRatings\XF\Repository\Reaction->insertReaction(1, 'siropu_chat_roo...', 13, Object(SV\BookmarkEssentials\XF\Entity\User), true, false)
#22 src/XF/ControllerPlugin/Reaction.php(65): XF\Repository\Reaction->reactToContent(1, 'siropu_chat_roo...', 13, Object(SV\BookmarkEssentials\XF\Entity\User), true)
#23 src/XF/ControllerPlugin/Reaction.php(19): XF\ControllerPlugin\Reaction->actionToggleReaction(Object(Siropu\Chat\Entity\Message), 'chat/message/re...', 'chat/message')
#24 src/XF/ControllerPlugin/Reaction.php(12): XF\ControllerPlugin\Reaction->actionReact(Object(Siropu\Chat\Entity\Message), 'chat/message', 'chat/message/re...', 'chat/message/re...')
#25 src/addons/Siropu/Chat/Pub/Controller/Message.php(241): XF\ControllerPlugin\Reaction->actionReactSimple(Object(Siropu\Chat\Entity\Message), 'chat/message')
#26 src/XF/Mvc/Dispatcher.php(350): Siropu\Chat\Pub\Controller\Message->actionReact(Object(XF\Mvc\ParameterBag))
#27 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('Siropu\\Chat:Mes...', 'React', Object(XF\Mvc\RouteMatch), Object(Siropu\Chat\Pub\Controller\Message), NULL)
#28 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Siropu\Chat\Pub\Controller\Message), NULL)
#29 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#30 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#31 src/XF.php(391): XF\App->run()
#32 index.php(20): XF::runApp('XF\\Pub\\App')
#33 {main}
Request state
array(4) {
  ["url"] => string(22) "/chat/message/13/react"
  ["referrer"] => string(62) "https://www.pijanitvor.com/chat/message/13/react?reaction_id=1"
  ["_GET"] => array(1) {
    ["/chat/message/13/react"] => string(0) ""
  }
  ["_POST"] => array(2) {
    ["reaction_id"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}



Code:
Server error log
ErrorException: Template error: Cannot call method getVisitorReactionCount on a non-object (string) src/XF/Template/Templater.php:989
Generated by: tester2 02.12.2019. at 03:00
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Cannot call met...', '/home/nginx/dom...', 989, Array)
#1 src/XF/Template/Templater.php(989): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/sv_contentratings_macros.php(151): XF\Template\Templater->method('', 'getVisitorReact...', Array)
#3 src/XF/Template/Templater.php(706): XF\Template\Templater->{closure}(Object(SV\BookmarkEssentials\XF\Template\Templater), Array, Array)
#4 src/XF/Template/Templater.php(784): XF\Template\Templater->callMacro('sv_contentratin...', 'rating_bar', Array, Array)
#5 src/addons/SV/ContentRatings/XF/Template/Templater.php(192): XF\Template\Templater->renderMacro('public:sv_conte...', 'rating_bar', Array)
#6 [internal function]: SV\ContentRatings\XF\Template\Templater->fnReactions(Object(SV\BookmarkEssentials\XF\Template\Templater), false, Object(Siropu\Chat\Entity\Message), 'chat/message/re...')
#7 src/XF/Template/Templater.php(941): call_user_func_array(Array, Array)
#8 src/XF/Template/Templater.php(911): XF\Template\Templater->func('reactions', Array, false)
#9 src/addons/Siropu/Chat/Service/Room/ActionLogger.php(33): XF\Template\Templater->fn('reactions', Array)
#10 src/addons/Siropu/Chat/Entity/Message.php(601): Siropu\Chat\Service\Room\ActionLogger->logMessageAction(Object(Siropu\Chat\Entity\Message))
#11 src/XF/Mvc/Entity/Entity.php(1208): Siropu\Chat\Entity\Message->_postSave()
#12 src/XF/Reaction/AbstractHandler.php(107): XF\Mvc\Entity\Entity->save()
#13 src/XF/Repository/Reaction.php(274): XF\Reaction\AbstractHandler->updateContentReactions(Object(Siropu\Chat\Entity\Message), Array, Array)
#14 src/addons/SV/ContentRatings/XF/Repository/Reaction.php(495): XF\Repository\Reaction->rebuildContentReactionCache('siropu_chat_roo...', 13, false, true)
#15 src/XF/Entity/ReactionContent.php(198): SV\ContentRatings\XF\Repository\Reaction->rebuildContentReactionCache('siropu_chat_roo...', 13, false)
#16 src/XF/Entity/ReactionContent.php(140): XF\Entity\ReactionContent->rebuildContentReactionCache()
#17 src/addons/SV/ContentRatings/XF/Entity/ReactionContent.php(180): XF\Entity\ReactionContent->_postSave()
#18 src/XF/Mvc/Entity/Entity.php(1208): SV\ContentRatings\XF\Entity\ReactionContent->_postSave()
#19 src/XF/Repository/Reaction.php(189): XF\Mvc\Entity\Entity->save()
#20 src/addons/SV/ContentRatings/XF/Repository/Reaction.php(863): XF\Repository\Reaction->insertReaction(1, 'siropu_chat_roo...', 13, Object(SV\BookmarkEssentials\XF\Entity\User), true, false)
#21 src/XF/Repository/Reaction.php(142): SV\ContentRatings\XF\Repository\Reaction->insertReaction(1, 'siropu_chat_roo...', 13, Object(SV\BookmarkEssentials\XF\Entity\User), true, false)
#22 src/XF/ControllerPlugin/Reaction.php(65): XF\Repository\Reaction->reactToContent(1, 'siropu_chat_roo...', 13, Object(SV\BookmarkEssentials\XF\Entity\User), true)
#23 src/XF/ControllerPlugin/Reaction.php(19): XF\ControllerPlugin\Reaction->actionToggleReaction(Object(Siropu\Chat\Entity\Message), 'chat/message/re...', 'chat/message')
#24 src/XF/ControllerPlugin/Reaction.php(12): XF\ControllerPlugin\Reaction->actionReact(Object(Siropu\Chat\Entity\Message), 'chat/message', 'chat/message/re...', 'chat/message/re...')
#25 src/addons/Siropu/Chat/Pub/Controller/Message.php(241): XF\ControllerPlugin\Reaction->actionReactSimple(Object(Siropu\Chat\Entity\Message), 'chat/message')
#26 src/XF/Mvc/Dispatcher.php(350): Siropu\Chat\Pub\Controller\Message->actionReact(Object(XF\Mvc\ParameterBag))
#27 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('Siropu\\Chat:Mes...', 'React', Object(XF\Mvc\RouteMatch), Object(Siropu\Chat\Pub\Controller\Message), NULL)
#28 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Siropu\Chat\Pub\Controller\Message), NULL)
#29 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#30 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#31 src/XF.php(391): XF\App->run()
#32 index.php(20): XF::runApp('XF\\Pub\\App')
#33 {main}
Request state
array(4) {
  ["url"] => string(22) "/chat/message/13/react"
  ["referrer"] => string(62) "https://www.pijanitvor.com/chat/message/13/react?reaction_id=1"
  ["_GET"] => array(1) {
    ["/chat/message/13/react"] => string(0) ""
  }
  ["_POST"] => array(2) {
    ["reaction_id"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 
@Sunka that is a bug/design flaw in @Siropu's add-on.

Calling a template render function before the templater() is setup for the view rendering may cause this sort of error for any template touching the $xf variable.

Before the view is constructed; XF calls this code;
PHP:
public function preRender(AbstractReply $reply, $responseType)
{
   $this->templater()->addDefaultParam('xf', $this->getGlobalTemplateData($reply));
}

However Siropu\Chat\Service\Room\ActionLogger::logMessageAction is occurring well before then in the controller.
 
We don't see highest ratings on post:

2-highest-ratings-on-threadlist-png.168237


What would you recommend? We have it enabled, but it's not there.
 
Top Bottom