User talk:Bellezzasolo/Scripts/arb

Latest comment: 1 year ago by FormalDude in topic Update for new templates?

Issue with GS logging edit

Hi Bellezzasolo, been having an issue with ARB not logging General Sanctions warnings. I select GS and the topic area, hit submit, click through the warning, re-select and re-submit. The message "Adding Discretionary Sanctions Notice: Retrieving page..." comes up but doesn't go any further. The user gets the warning on their talk page, but the sanction isn't logged. Here's an error dump from my browser's console log (Firefox 73.0.1, in case that's relevant):

long error dump
The following discussion has been closed. Please do not modify it.

registered index.php:246:29 TypeError: talkpage.append(...) is undefined index.php:990:11

   issue_warning https://en.wikipedia.org/w/index.php?title=User:Bellezzasolo/Scripts/arb.js&action=raw&ctype=text/javascript:990
   evaluate https://en.wikipedia.org/w/index.php?title=User:Bellezzasolo/Scripts/arb.js&action=raw&ctype=text/javascript:967
   addContent https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:698

Adding Discretionary Sanctions Notice: Invalid token. Refresh the page and try again load.php:688:551

   update https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:688
   error https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:689
   returnError https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:651
   post https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:650
   jQuery 4

Adding Discretionary Sanctions Notice: ⧼abusefilter-warning-DS⧽ load.php:688:551

   update https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:688
   error https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:689
   returnError https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:651
   post https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:650
   jQuery 4

Adding Discretionary Sanctions Notice: A warning was returned by the edit filter: ",Arbitration discretionary sanctions alerts,". If you wish to proceed with the edit, please carry it out again. This warning will not appear a second time. load.php:688:551

   update https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:688
   error https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:689
   fnSaveError https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:670
   returnError https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:651
   post https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:650
   jQuery 4

Half-complete sanction detected index.php:706:12 TypeError: talkpage.append(...) is undefined index.php:990:11

   issue_warning https://en.wikipedia.org/w/index.php?title=User:Bellezzasolo/Scripts/arb.js&action=raw&ctype=text/javascript:990
   evaluate https://en.wikipedia.org/w/index.php?title=User:Bellezzasolo/Scripts/arb.js&action=raw&ctype=text/javascript:967
   addContent https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:698

Adding Discretionary Sanctions Notice: Invalid token. Refresh the page and try again load.php:688:551

   update https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:688
   error https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:689
   returnError https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:651
   post https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:650
   jQuery 4

TypeError: params is null index.php:753:15

   gslog https://en.wikipedia.org/w/index.php?title=User:Bellezzasolo/Scripts/arb.js&action=raw&ctype=text/javascript:753
   fnLoadSuccess https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:667
   post https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.DRN-wizard,HotCat,PrettyLog,ProveIt,ReferenceTooltips,Shortdesc-helper,Twinkle,XFDcloser,XTools-ArticleInfo,citations,confirmationRollback-mobile,contribsrange,defaultsummaries,dropdown-menus,extra-toolbar-buttons,formWizard,geonotice,libSettings,markblocked,metadata,morebits,purgetab,refToolbar,responsiveContent,script-installer,select2,switcher,topalert,watchlist-notice&skin=vector&version=13i6r:650
   jQuery 4

I think the "talkpage.append() is undefined" warning isn't relevant to this particular issue - I tested by giving myself DS notifications and those errors appeared there too (but the DS finished successfully, so presumably the issue here is with the logging function). Guessing the root issue is "params is null" at the end. I doubt I'll be of much help actually fixing the bug (JS isn't really one of my languages), but if I can do any testing to help you track this down further, please let me know. creffett (talk) 01:40, 29 February 2020 (UTC)Reply

WP:DS versus WP:AC/DS edit

Hi Bellezzasolo, and thanks for developing this useful script. I noticed that the edit summaries produced by this script link to WP:DS (which redirects to Wikipedia:WikiProject Deletion sorting) instead of WP:AC/DS (which redirects to Wikipedia:Arbitration Committee/Discretionary sanctions). There are two lines in the script that refer to WP:DS:

		var editsummary = "Adding [[WP:DS|Discretionary Sanctions]] Notice (" + type + ")" + Twinkle.getPref("summaryAd");
	var talkpage = new Morebits.wiki.page(fullUserTalkPageName, "Adding [[WP:DS|Discretionary Sanctions]] Notice");

Could you please change the above lines to use WP:AC/DS instead? — Newslinger talk 17:52, 14 March 2020 (UTC)Reply

GS likely broken edit

Wanted to let you know that I think GS support will be broken due to changes to that template, meaning the current method of parsing won't work. To fix, it would need to be able to parse the syntax at Module:Sanctions/data. ProcrastinatingReader (talk) 17:12, 27 September 2020 (UTC)Reply

Two potential issues edit

@Bellezzasolo: I haven't looked too closely into this but I've found two potential areas of improvement:

  • {{Ds/aware}} isn't yet supported, and the current system relies on lua code that's called from the edit filter warning. Is there any way that we can either check for {{ds/aware}} or we can show the actual message of the edit filter warning (which would show the existence of {{ds/aware}} with a It is not necessary to notify this user of sanctions for the following topic area(s): message)?
  • It seems that when alerts are given for multiple topic areas in one edit, the parser doesn't work. Take, as a random example, Skbera; this user was notified for IPA and for BLPs but when you try to leave an alert for either one, ARB says This user has not been notified of these sanctions.

Let me know what I can do to help on these. Best, Kevin (alt of L235 · t · c) 07:38, 22 November 2020 (UTC)Reply

Problem with checking talk pages for past alerts edit

Anyone else having problems checking talk pages when you give someone an alert? The check alert box says "A system filter has identified that you are trying to alert Badtitle/ApiErrorFormatter::getDummyTitle (contribs · logs · block log) to the existence of discretionary sanctions." and when you click on check talk page you go to User talk:Badtitle/ApiErrorFormatter::getDummyTitle: Revision history. --Doug Weller talk 17:54, 23 December 2020 (UTC)Reply

Bugs when leaving GS COVID notice on user talk pages edit

On the first attempt to leave the notice, it displays the edit filter warning, but with no button to continue anyway. On the second attempt to leave the notice (after refreshing the page), it posts the notice, but it does not inform the user of this. Instead it appears to hang and get stuck. A second refresh lets the user see that the notice was indeed placed. If you have time, consider taking a look. Thank you. –Novem Linguae (talk) 10:58, 8 May 2021 (UTC)Reply

Leaving gs table instead of alert. edit

See [1]. Doug Weller talk 19:15, 4 January 2022 (UTC)Reply

@Bellezzasolo: I am also experiencing this problem when I try to leave a General Sanction alert for COVID-19. ––FormalDude talk 03:41, 10 January 2022 (UTC)Reply
@FormalDude: sadly Bellezzasolo hasn't edited for 2 months. Took this to Wikipedia:Village pump (technical)Doug Weller talk 08:45, 10 January 2022 (UTC)Reply
  Courtesy link: Wikipedia:Village pump (technical) § User:Bellezzasolo/Scripts/arb is broken, Bellezzasolo hasn't edited for two monthsNovem Linguae (talk) 11:07, 10 January 2022 (UTC)Reply

Update for new templates? edit

I believe the script is no longer working because of the new contentious topics templates. ––FormalDude (talk) 01:08, 1 February 2023 (UTC)Reply