Jump to content

User talk:Jdlrobson/User scripts with client errors

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 3 years ago by Jdlrobson in topic User Script on sawikipedia

Pinging[edit]

@Jdlrobson: I don’t think the pings you place on the page actually work—at least, a valid signature is needed for Echo to recognize it as a ping, but maybe there are other requirements as well. If the only requirement is a signature, you could easily replace

Last updated 24th October

with

Last updated: ~~~~

and re-sign it every time. —Tacsipacsi (talk) 21:05, 25 October 2020 (UTC)Reply

Thanks for letting me know! I'll re-run it this week and try again (and ping my staff account to verify). Jdlrobson (talk) 00:40, 26 October 2020 (UTC)Reply

Error in your scripts - can you please review?[edit]

Please see the most recent report of errors in gadgets and user scripts on User:Jdlrobson/User_scripts_with_client_errors and fix. Please don't hesitate to ask questions if you have any. Pinging the following users who may be able to help!

User:Omar2040, User:Paweł_Ziemian, User:Trần_Nguyễn_Minh_Huy, User:Nico, User:Zanaq, User:Xaosflux, User:Prolineserver, User:Skmp, User:Mahir256, User:Cacycle, User:PhiLiP, User:Euku, User:MintCandy, User:Lucas Werkmeister, User:Anomie, User:Strangnet, User:Zanaq, User:SNN95, User:Aca, User:Jon (WMF) Jdlrobson (talk) 21:42, 26 October 2020 (UTC)Reply

I think I fixed error for sr.wiki. Greetings! --Aca (talk) 22:03, 26 October 2020 (UTC)Reply

@Danmichaelo: Apparently d:User:Danmichaelo/Gadget-DuplicateReferences.js is causing errors; you probably need to apply d:Special:Diff/1032529349 to your copy of the gadget. --Lucas Werkmeister (talk) 22:30, 26 October 2020 (UTC)Reply
@Jdlrobson: I don't immediately see how the error shown for the merge gadget is appearing; OO.ui is clearly available in my browser console even when logged out, and I am not aware of any complaints elsewhere lately about the merge gadget not appearing (which is what I presume OO.ui would have to do with). Mahir256 (talk) 22:38, 26 October 2020 (UTC)Reply
Neither OO orOO.ui is not available by default, Mahir256. It may be loaded by an another gadget you run, but depending how and when the gadget is run it won't be true unless these modules are loaded by loading the relevant module using either
mw.loader.using(['oojs-ui']).then(initFunction)
or updating MediaWIki:Gadgets-definition. Does that help? Jdlrobson (talk) 05:24, 27 October 2020 (UTC)Reply
@Jdlrobson: I'm a bit lost on your report - exactly which one of my userpages has an error, and what is it? — xaosflux Talk 23:29, 26 October 2020 (UTC)Reply
Also, I'm not a maintainer for MediaWiki:Gadget-HotCat.js — xaosflux Talk 01:34, 27 October 2020 (UTC)Reply
Sorry about that Xaoflux. Do you know who is the maintainer? I'll update my references. Jdlrobson (talk) 05:24, 27 October 2020 (UTC)Reply
As far as I can tell it is "community maintained" on commonswiki - you can contact them at commons:MediaWiki talk:Gadget-HotCat.js. — xaosflux Talk 01:24, 28 October 2020 (UTC)Reply
Any updates here User:Omar2040? The amount of modules is still extremely high so I would recommend we delete this gadget tomorrow. Jdlrobson (talk) 22:12, 3 November 2020 (UTC)Reply
Hello Jdlrobson I apologize, I forgot to review the gadget, it has been deleted. Thank you --Omar2040 (talk) 23:10, 3 November 2020 (UTC)Reply

Jon, is this a current problem? I haven't touched that module of Twinkle for a few days now, and it does seem to be working at the moment.

Vito Genovese 23:27, 29 October 2020 (UTC)Reply

Unfortunately yes it's still happening. I suspect somebody is loading it incorrectly via their own user scripts. I can investigate and patch it tomorrow if that's helpful to you. Jdlrobson (talk) 23:44, 29 October 2020 (UTC)Reply

Thank you for the offer. Since this version is for interface admins only, we can easily narrow it down to my or User:Evrifaessa's personal js page. I think I now see why it happens. The rest of Twinkle is being used as a gadget while this particular module is being called from our personal js pages in order to ensure that all changes come into effect immediately -- it is a pain to work actively on gadgets due to the caching issue. Anyway, the error should go away when I am done with the module and add it back to Gadgets-definition. Thanks again.
Vito Genovese 00:12, 30 October 2020 (UTC)Reply

Script with errors[edit]

Hi @Jdlrobson: my script is working well and i do not see any errors or strange things. Anyway i modified the sintax. Can you check if this script get an error yet? Best regards.--Andriy.v (talk) 22:34, 4 January 2021 (UTC)Reply

Hi @[[Andriy.v]] That looks like it should do it.
$('#fooasoasosaoassa').html()
returns undefined for a selector that doesn't match anything so I suspect that will do it. Will check the logs tomorrow! thanks for dealing with it so quickly! Jdlrobson (talk) 01:09, 5 January 2021 (UTC)Reply
@Jdlrobson: Some advice to how can i mitigate this error?--Andriy.v (talk) 21:23, 12 January 2021 (UTC)Reply
$('li#ca-edit').html() can return undefined if #ca-edit doesn't exist, so you'll need to add an if check and return if it's null
e.g.
```
var html = $('li#ca-edit').html();
if(!html)return;
$('li#ca-edit').html(editbutton.replace('Редагувати код', 'Перегляд'));
``` Jdlrobson (talk) 23:20, 12 January 2021 (UTC)Reply

User Script on sawikipedia[edit]

Hello, I have updated the script. Please check if the error is removed or not. Thanks. --SM7--talk-- 06:00, 6 January 2021 (UTC)Reply

Thank you! Looks fixed to me! Jdlrobson (talk) 23:23, 12 January 2021 (UTC)Reply