importScript, importScriptURI, and addPortletLink errors
Closed, DeclinedPublic

Description

While testing gadgets tonight on commonswiki.beta I tested enabling all gadgets and visiting http://commons.wikimedia.beta.wmflabs.org/wiki/File:20080406165033!V-22_Osprey_refueling_edit1.jpg?debug=true.

I had to disable some gadgets that referenced "addPortletLink" but still ended up with importScript and importScriptURI errors. I thought these calls were supposed to be part of core, so I'm reporting them here:

importScript is not defined
http://commons.wikimedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Gadget-
GalleryDetails.js&action=raw&ctype=text/javascript&26218
Line 21

importScriptURI is not defined
http://commons.wikimedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Gadget-
RegexMenuFramework.js&action=raw&ctype=text/javascript&26217
Line 9

Version: 1.20.x
Severity: normal

Details

Reference
bz34147
bzimport raised the priority of this task from to High.
bzimport set Reference to bz34147.

adding Saibo so he knows what I found.

I had to disable some gadgets that referenced "addPortletLink"

Surely addPortletLink should also (Still) be in core?

All legacy wikibits functions are still in core and preloaded from a blocking state on all pages. If they are unavailable at any point in execution, that is a bug.

This also includes the various import* functions and addPortletLink.

Assigning to krinkle since he has the most clue about this, AFAIK

Marking INVALID. These are part of legacy wikibits, available by default unconditionally. If they are not working then there is something heavily broken on beta.

I want to get this confirmed (and, hopefully, fixed) as a beta problem before we deploy the code.

I also can not reproduce and suspect it's been fixed between the time it was reported and now.

Fixed by r110592 and related revisions. The "blocking" top queue wasn't blocking properly in debug mode.

yep, still seeing errors on commons.

(In reply to comment #10)

Still got two errors when accessing
http://commons.wikimedia.beta.wmflabs.org/wiki/User:Saibo (logged in with "my"
gadgets enabled")

Is this still the case? I created an account, enabled Geotoolbox and GalleryDetails, then visited User:Saibo, but got no errors.

He7d3r added a comment.Feb 8 2012, 5:01 PM

(In reply to comment #12)

(In reply to comment #10)
> Still got two errors when accessing
> http://commons.wikimedia.beta.wmflabs.org/wiki/User:Saibo (logged in with "my"
> gadgets enabled")
>
Is this still the case? I created an account, enabled Geotoolbox and
GalleryDetails, then visited User:Saibo, but got no errors.

Yep! I enabled the same two gadgets (keeping also enabled the default ones) and then opened
http://commons.wikimedia.beta.wmflabs.org/wiki/Special:MyPage
When I SHIFT+Reloaded the page, the errors happened.

Never mind, I've got it reproduced now, just needed to visit the main page instead.

I messed around a bit with introducing debugging code into mediawiki.js and removing it again, and the issue seems to have magically gone away now. Maybe it's due to my purging the startup module cache a few times.

I can't reproduce this anymore, can anyone else?

(In reply to comment #15)

I can't reproduce this anymore, can anyone else?

Looks fixed to me, too.

saibotrash wrote:

fails completely for me... On every page:

Fehler: addPortletLink is not defined
Quelldatei: http://commons.wikimedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Gadget-Geotoolbox.js&action=raw&ctype=text/javascript&1601
Zeile: 27

Fehler: importScript is not defined
Quelldatei: http://commons.wikimedia.beta.wmflabs.org/w/load.php?debug=false&lang=de&modules=user&only=scripts&skin=monobook&user=Saibo&version=20120131T165649Z&*
Zeile: 1

Fehler: importScript is not defined
Quelldatei: http://commons.wikimedia.beta.wmflabs.org/w/index.php?title=MediaWiki:Gadget-GalleryDetails.js&action=raw&ctype=text/javascript&26324
Zeile: 21

Apparently no gadgets are loaded now due to that bugs.

In looking at this bug yesterday (and similar RL issues on the beta cluster), I think this showed a problem with caching. Whether it was a RL issue or a beta configuration issue, I don't know, but I think this is more of a symptom than the actual problem.

Changing priority and assignment since Krinkle is only available half time and we will make sure to test this thoroughly on test2.

I'm assuming based on our conversation earlier today that this one won't repro in production