Last modified: 2010-01-08 14:44:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22970, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20970 - GoogleMaps tries to add icon to toolbar, without checking it exist
GoogleMaps tries to add icon to toolbar, without checking it exist
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GoogleMaps (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Evan Miller
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-03 10:14 UTC by Chris
Modified: 2010-01-08 14:44 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
changes the inline js to test for the existence of toolbar before doing add (427 bytes, patch)
2009-10-03 10:14 UTC, Chris
Details

Description Chris 2009-10-03 10:14:50 UTC
Created attachment 6617 [details]
changes the inline js to test for the existence of toolbar before doing add

in GoogleMaps.body.php around line 284ish, there is a call to document.getElementById('toolbar').appendChild(image);

when editing a User:USERNAME/skin.js page, the toolbar is suppressed (for whatever reason), and does not exist, so the above call fails, and dumps a javascript error into ye olde browser's error reporting console.
ex:  Error: document.getElementById("toolbar") is null

i've added a patch file to attempt to check that it exists, then adds it if it is present.

i created the file out of wikia's svn, as thats what i had handy.
the linenumbers likely wont match, nor the version numbers, as the two versions arent entirely in sync, but the differences are minor and not relevant to this section of code.

i'll be fixing this in wikia's version shortly, just thought i'd share the fix upstream.
Comment 1 Chad H. 2010-01-08 14:44:56 UTC
Done in r60838.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links