Alert Improvements by Xon

Alert Improvements by Xon 2.10.13

No permission to download
The alert consolidation feature doesn't handle upgrades from XF2.0 => XF2.1 well.

The following SQL will purge the incorrect summarized alerts, and allow them to be rebuilt;
SQL:
delete
from xf_user_alert
where depends_on_addon_id = 'SV/AlertImprovements' OR (summerize_id IS NULL AND `action` like '%_summary');

update xf_user_alert
set summerize_id = null
where summerize_id IS NOT NULL;
 
  • Love
Reactions: rdn
The alert consolidation feature doesn't handle upgrades from XF2.0 => XF2.1 well.

The following SQL will purge the incorrect summarized alerts, and allow them to be rebuilt;
SQL:
delete
from xf_user_alert
where depends_on_addon_id = 'SV/AlertImprovements' OR (summerize_id IS NULL AND `action` like '%_summary');

update xf_user_alert
set summerize_id = null
where summerize_id IS NOT NULL;
Thanks, but I got this:
194868

My upgrade was from XF1.5 to 2.1.0
 
I just upgraded from XF1.5, now I'm receiving this error every minute:
Code:
ErrorException: Template error: Template public:alert_post_like_summary is unknown src/XF/Template/Templater.php:611

Looks like coming from your XF1 addon?

Can it be fix by installing this XF2 version?
Sorry, I should have posted this on XF1 thread.
 
Thanks, but I got this:
View attachment 194868

My upgrade was from XF1.5 to 2.1.0
Sorry, I should have posted this on XF1 thread.
Try this;
SQL:
delete
from xf_user_alert
where  `action` like '%_summary';
 
@Xon
getting this error
Xenforo 2.1

Code:
Server error log
InvalidArgumentException: Accessed unknown getter 'sv_rating_type' on XF:UserAlert[1262391] src/XF/Mvc/Entity/Entity.php:194
Generated by: cvaknuta 06.02.2019. at 11:49
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/s1/public/alert_post_rating.php(9): XF\Mvc\Entity\Entity->offsetGet('sv_rating_type')
#2 src/XF/Template/Templater.php(1294): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\XF\Template\Templater), Array)
#3 src/XF/Alert/AbstractHandler.php(80): XF\Template\Templater->renderTemplate('alert_post_rati...', 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(978): call_user_func_array(Array, Array)
#7 internal_data/code_cache/templates/l1/s1/public/alert_macros.php(42): XF\Template\Templater->method(Object(SV\AlertImprovements\XF\Entity\UserAlert), 'render', Array)
#8 src/XF/Template/Templater.php(694): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\XF\Template\Templater), Array, Array)
#9 internal_data/code_cache/templates/l1/s1/public/account_alerts_popup.php(16): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)
#10 src/XF/Template/Templater.php(1294): XF\Template\Templater->{closure}(Object(SV\ConversationEssentials\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(174) "/account/alerts-popup?_xfRequestUri=%2Fwhats-new%2Fposts%2F275864%2F&_xfWithData=1&_xfToken=1549450091%2C424fb91c3b46f7e1de9af154b932bdae&_xfResponseType=json&_=1549450109847"
  ["referrer"] => string(50) "https://www.pijanitvor.com/whats-new/posts/275864/"
  ["_GET"] => array(6) {
    ["/account/alerts-popup"] => string(0) ""
    ["_xfRequestUri"] => string(24) "/whats-new/posts/275864/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1549450091,424fb91c3b46f7e1de9af154b932bdae"
    ["_xfResponseType"] => string(4) "json"
    ["_"] => string(13) "1549450109847"
  }
  ["_POST"] => array(0) {
  }
}
 
Apologies, it looks like I need to overhaul the reaction support to work with XF2.1. That said, please update to this add-on, as it should not directly touch sv_rating_type unless Content Ratings is installed & active (which is not compatible with XF2.1)
 
Sorry, but I am not sure that I understand you @Xon .
I upgraded yesterday xenforo to 2.1.
Before upgrading, I disabled your addons Content ratings, Content ratings XFMG and Content ratings XFRM.
They are still disabled.

So what to do?

Thank you
 
@Sunka This looks to be leftover junk from Content Ratings.

This SQL will delete all the old alerts which are erroring;
SQL:
delete
from xf_user_alert
where  depends_on_addon_id = 'SV/ContentRatings';
 
Thanks
913 rows affected. (Query took 0.0104 seconds.)

P.S. That wont affect upgrading Content rating when you make it compatible with xf 2.1?
 
Hi @Xon, we are getting errors in ACP. Maybe only related to XenPorta?


Server error log
  • ErrorException: Template error: Template public:aloph_op_post_indicator_EWRporta is unknown
  • src/XF/Template/Templater.php:611
  • Generated by: User
  • Feb 27, 2019 at 1:59 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/home/dir/...', 611, Array)
#1 src/XF/Template/Templater.php(611): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(562): XF\Template\Templater->getTemplateData('public', 'aloph_op_post_i...')
#3 src/XF/Template/Templater.php(1293): XF\Template\Templater->getTemplateCode('public', 'aloph_op_post_i...')
#4 src/XF/Template/Templater.php(1367): XF\Template\Templater->renderTemplate('aloph_op_post_i...', Array)
#5 internal_data/code_cache/templates/l1/s7/public/EWRporta_article_macros.php(492): XF\Template\Templater->includeTemplate('public:aloph_op...', Array)
#6 src/XF/Template/Templater.php(694): XF\Template\Templater->{closure}(Object(SV\AlertImprovements\XF\Template\Templater), Array, Array)
#7 internal_data/code_cache/templates/l1/s7/public/post_edit_new_post.php(48): XF\Template\Templater->callMacro('EWRporta_articl...', 'article_comment', Array, Array)
#8 src/XF/Template/Templater.php(1294): XF\Template\Templater->{closure}(Object(SV\AlertImprovements\XF\Template\Templater), Array)
#9 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('post_edit_new_p...', Array)
#10 src/XF/Mvc/Renderer/Json.php(84): XF\Template\Template->render()
#11 src/XF/Mvc/Renderer/Json.php(68): XF\Mvc\Renderer\Json->renderHtmlFallback('XF:Post\\EditNew...', 'public:post_edi...', Array)
#12 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Json->renderView('XF:Post\\EditNew...', 'public:post_edi...', Array)
#13 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#16 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#17 src/XF.php(390): XF\App->run()
#18 index.php(20): XF::runApp('XF\\Pub\\App')
#19 {main}
Request state
array(4) {
["url"] => string(19) "/posts/4775520/edit"
["referrer"] => string(71) "https://domain/threads/please-share-the-data.307450/page-2"
["_GET"] => array(0) {
}
["_POST"] => array(8) {
["message_html"] => string(1095) "<p>
</p><p>To OP's point: If U/L are tracking our data, then we should be able to get it from them. They could provide a simple data dump (in a CSV file or similar) that we could then put in a spreadsheet with time, miles, pay breakdown, etc. Sure I could track it on my own, but I'd rather my "business partners" provide it upon request since they're tracking it all anyway...</p><p>
</p><p><br></p><p>Again the Uber/Lyft miles do not account for dead miles, and that's a huge number that needs to be captured. &nbsp;. &nbsp;Even if they did running 2 apps at once will result in the same miles being recorded by both Lyft and Uber so they will not be inaccurate. &nbsp;The best way is to get an app and record them outside of the Uber/Lyft app. &nbsp;Then get in the habit of stopping and stating it when you close a ride to be safe with regard to an audit. &nbsp;</p><p><br></p><p>As I said above Schedule C Question 47 simply asks if you have written documentation. To assume that means a hand written log is kind of idiotic. &nbsp;</p>"
["_xfInlineEdit"] => string(1) "1"
["attachment_hash"] => string(32) "566df991f4e48bfbdfddbae47cd690a6"
["attachment_hash_combined"] => string(87) "{"type":"post","context":{"post_id":4775520},"hash":"566df991f4e48bfbdfddbae47cd690a6"}"
["_xfToken"] => string(8) "****"
["_xfRequestUri"] => string(49) "/threads/please-share-the-data.307450/page-2"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
@upnet It's the Original Poster Highlight add-on causing the issue (error refers to aloph_op_post_indicator_EWRporta).

I tried to notify @AddonsLab of this.

For now, you should be able to fix this by replacing the EWRporta_article_macros template modification containing the following replacement:
Code:
$0
<xf:include template="aloph_op_post_indicator_EWRporta" />

..and assuming you're using XF 2.1, change it to:
Code:
$0
<xf:include template="aloph_op_post_indicator_EWRporta_xf21" />
 
Some of my user says that they get an alert (summorized) with the text from sv_x_rated_y_content_z_times when the same user have liked/reacted on different post in the same thread.
 
Some of my user says that they get an alert (summorized) with the text from sv_x_rated_y_content_z_times when the same user have liked/reacted on different post in the same thread.
What version of XenForo? There should be a phrase sv_x_rated_y_content_z_times which is used when a user likes/rates a large number of posts by themselves.
 
XF2.1, they seem to get that phrase, but is that not just for rating and not for reactions, I have no ratings on my site. The varibles do not have a value: {ratedcontent} {ratings}
 
  • Like
Reactions: Xon
Top Bottom