Content Ratings

Content Ratings [Paid] 2.7.6

No permission to buy ($35.00)
I have seven different ratings and after upgrading have the same seven different reactions, sorry if I didn’t make that clear
On the contrary, you made this clear the first time but I thought you just made a typo. I was a bit surprised because I thought ratings are stored in a separate table belongs to this particular addon. But if that works, that is very good news.
 
On the contrary, you made this clear the first time but I thought you just made a typo. I was a bit surprised because I thought ratings are stored in a separate table belongs to this particular addon. But if that works, that is very good news.

I'm about to do another test, will post before and after screenshots later
 
On the contrary, you made this clear the first time but I thought you just made a typo. I was a bit surprised because I thought ratings are stored in a separate table belongs to this particular addon. But if that works, that is very good news.
v1.3 of the add-on uses the 2.1 db structure, but in order for the ratings to appear as reactions, the cache needs to be rebuilt, which is what Andy's add-on does.
 
I was attempting to UNINSTALL v1.2.5 and got the following errors, now the add-on is stuck in the "pending action" state. Any ideas how to resolve?

Code:
InvalidArgumentException: Table 'xf_liked_content' does not exist so cannot be altered in src/XF/Db/Schema/Alter.php at line 38

XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 223
XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 144
XF\Db\SchemaManager->alterTable() in src/addons/SV/ContentRatings/Setup.php at line 436
SV\ContentRatings\Setup->uninstallStep5() in src/XF/AddOn/StepRunnerUninstallTrait.php at line 59
SV\ContentRatings\Setup->uninstallStepRunner() in src/XF/AddOn/StepRunnerUninstallTrait.php at line 26
SV\ContentRatings\Setup->uninstall() in src/XF/Admin/Controller/AddOn.php at line 635
XF\Admin\Controller\AddOn->actionUninstall() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
 
I was attempting to UNINSTALL v1.2.5 and got the following errors, now the add-on is stuck in the "pending action" state. Any ideas how to resolve?

Code:
InvalidArgumentException: Table 'xf_liked_content' does not exist so cannot be altered in src/XF/Db/Schema/Alter.php at line 38

XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 223
XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 144
XF\Db\SchemaManager->alterTable() in src/addons/SV/ContentRatings/Setup.php at line 436
SV\ContentRatings\Setup->uninstallStep5() in src/XF/AddOn/StepRunnerUninstallTrait.php at line 59
SV\ContentRatings\Setup->uninstallStepRunner() in src/XF/AddOn/StepRunnerUninstallTrait.php at line 26
SV\ContentRatings\Setup->uninstall() in src/XF/Admin/Controller/AddOn.php at line 635
XF\Admin\Controller\AddOn->actionUninstall() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
Update the files to 1.3.14.2 then run the uninstaller.
 
OK does not appear quite right.

All the ratings types import fine, and shows reactions with the count for each one


View attachment 198294


But the notable members page shows only the like count here:

(strangely it is 4 higher !)

View attachment 198291

However when you click on the name, it shows the correct reaction score (ie sum of all the positives)

In this case there are 7659 positives of which 3854 are likes. However

View attachment 198292


Those should both show reaction score, no?

Out of curiosity, now that you hacked (hacked because it's not an official importer from the original developer of this addon, e.g. @Xon, not in a negative sense) into converting all your ratings to XF reactions, what'll happen if you now uninstall the Content Rating addon. Will you lose the original CR ratings?
If yes, that's an issue.
If no, would that mean if someone uninstalls CR 1.3.14.2 without converting to XF2.X first, he'll end up having garbage ratings in his database?
 
Out of curiosity, now that you hacked (hacked because it's not an official importer from the original developer of this addon, e.g. @Xon) into converting all your ratings to XF reactions, what'll happen if you now uninstall the Content Rating addon. Will you lose the ratings from CR addon?
If yes, that's an issue.
If no, would that mean if someone uninstalls CR 1.3.14.2 without converting to XF2.1 first, he'll end up having garbage ratings in his database?
I think the reactions would remain after the add-on was uninstalled on XF 2.1, but I believe if the add-on was uninstalled BEFORE the upgrade to 2.1, all the ratings would be lost. My suggestion would be to leave it installed, but keep it disabled on 2.1 until the updated version comes out.
 
I think the reactions would remain after the add-on was uninstalled on XF 2.1, but I believe if the add-on was uninstalled BEFORE the upgrade to 2.1, all the ratings would be lost.
Just wondering, how the uninstaller would differentiate between the scenarios when to keep the ratings (e.g. when someone used the Cache rebuild method to convert from ratings to reactions) and to remove them (e.g. someone genuinely wants to get rid of all the CR addon data, as happens during any other addon uninstallation). Asking because I don't think the Cache rebuild addon does anything with the reaction table to flag the reaction such as "XF" and "CR".

Just thinking out loud without having any particular motive.
 
OK, upgrade to 2.1 on live site done, all seems to be fine. All Content ratings converted to xf core reactions

This seems to be good order of doing things

  • Disable Content ratings before upgrade
  • Run SQL command delete from xf_news_feed where content_type = 'post' and action = 'rating'
  • ACP> Content> Reactions: Fix all reactions neutral/positive as necessary
  • Run AndyB addon Rebuild post reactions cache
  • Run xenforo cache Rebuild reaction score
NB: It can take an hour for the reaction score to show correctly in the Notable Members Top 5 Reactions list

198393
 
Last edited:
I did successful upgrade to 2.1 yesterday as mentioned.

Content ratings has been disabled;ed (since before the upgrade.

But today I got some errors
Code:
Server error log
InvalidArgumentException: Accessed unknown getter 'sv_rating_type' on XF:UserAlert[779073] src/XF/Mvc/Entity/Entity.php:194
Generated by: trimmy Mar 20, 2019 at 12:27 PM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('sv_rating_type')
#1 internal_data/code_cache/templates/l1/s72/public/alert_conversation_message_rating.php(9): XF\Mvc\Entity\Entity->offsetGet('sv_rating_type')
#2 src/XF/Template/Templater.php(1301): XF\Template\Templater->{closure}(Object(SV\AlertImprovements\XF\Template\Templater), Array)
#3 src/XF/Alert/AbstractHandler.php(80): XF\Template\Templater->renderTemplate('alert_conversat...', Array)
#4 src/XF/Entity/UserAlert.php(69): XF\Alert\AbstractHandler->render(Object(SV\AlertImprovements\XF\Entity\UserAlert))
#5 [internal function]: XF\Entity\UserAlert->render()
#6 src/XF/Template/Templater.php(985): call_user_func_array(Array, Array)
#7 internal_data/code_cache/templates/l1/s72/public/alert_macros.php(42): XF\Template\Templater->method(Object(SV\AlertImprovements\XF\Entity\UserAlert), 'render', Array)
#8 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(SV\AlertImprovements\XF\Template\Templater), Array, Array)
#9 internal_data/code_cache/templates/l1/s72/public/account_alerts_popup.php(18): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)
#10 src/XF/Template/Templater.php(1301): XF\Template\Templater->{closure}(Object(SV\AlertImprovements\XF\Template\Templater), Array)
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('account_alerts_...', Array)
#12 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#13 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Account\\Aler...', 'public:account_...', Array)
#14 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Json->renderView('XF:Account\\Aler...', 'public:account_...', Array)
#15 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#18 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#19 src/XF.php(390): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
Request state
array(4) {
  ["url"] => string(157) "/account/alerts-popup?_xfRequestUri=%2Fwhats-new%2F&_xfWithData=1&_xfToken=1553084842%2Cb89f76b23bc4bf95bdf905d962bc500d&_xfResponseType=json&_=1553084842474"
  ["referrer"] => string(36) "https://cafesaxophone.com/whats-new/"
  ["_GET"] => array(5) {
    ["_xfRequestUri"] => string(11) "/whats-new/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1553084842,b89f76b23bc4bf95bdf905d962bc500d"
    ["_xfResponseType"] => string(4) "json"
    ["_"] => string(13) "1553084842474"
  }
  ["_POST"] => array(0) {
  }
}

NB: these are the first error I got. I did run the query delete from xf_news_feed where content_type = 'post' and action = 'rating' yesterday immediately after upgrading
 
I'm not sure if this will be an unpopular opinion but I kind of think this shouldn't be the support thread to solve problems for people who've ignored @Xon's advice and tried to hack something together themselves to work. Xon shouldn't need to support that and it's going to end up making the thread very confusing as none of these are "official" solutions.

Not trying to be a **** about it but I'd suggest discussing this in a separate thread.

And yes, we're desperately waiting for Xon to update the addon as well so I get why people are frustrated and trying anything they can to get it to work.
 
I'm not sure if this will be an unpopular opinion but I kind of think this shouldn't be the support thread to solve problems for people who've ignored @Xon's advice and tried to hack something together themselves to work.
Is this a reply to me?

My post is about errors I got after disabling the addon. I have not hacked anything and gone against his advice, merely disabled the addon before upgrading to 2.1 (as advised) That is totally relevant IMO.
 
Maybe I've misunderstood.

This is the official way that @Xon recommends?
"You need to check the rating scores manually and rebuild caches with the Andyb addon mentioned"

If you're using another 3rd party addon to try and get it working then that's what I meant by "hacking". I'm happy to be corrected though if I mis-interpreted.
 
Error checking is part of the support process that should be dealt with in the thread where the add-on exists. I don't agree with these methods of trying to upgrade without a release either but @Mr Lucky obviously posted a support issue. There's nothing wrong with that
 
The other add-on is doing what it is designed to do. No "hacking" involved.

So that's part of the officially supported upgrade path for Xon's addon?

Or it's using other unsupported (by Xon) code to get around the fact that there is currently no official upgrade path? I thought it was the latter, apologies if not.
 
Top Bottom