Last modified: 2010-05-15 15:33:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 2322 - Javascript errors due to apostrophe in tooltips.
Javascript errors due to apostrophe in tooltips.
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
PC Windows 2000
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-06-04 16:50 UTC by Mark Clements (HappyDog)
Modified: 2010-05-15 15:33 UTC (History)
0 users

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


Description Mark Clements (HappyDog) 2005-06-04 16:50:15 UTC
Javascript errors are occurring in the auto-generated tooltips & access-keys
javascript header in the monobook skin (though it may affect other skins too).

The error is caused by unescaped quote marks appearing in quoted strings.


ta['pt-anonuserpage'] = new Array('.','The user page for the ip you're editing as');
(the ' in you're should be escaped).

URL on my local wiki is
Comment 1 Brion Vibber 2005-06-04 23:00:23 UTC
These are not auto-generated, they come from the message 'monobook.js', editable via [[MediaWiki:Monobook.js]].

Perhaps you have edited this message and removed the escapes?
Comment 2 Mark Clements (HappyDog) 2005-06-05 04:07:04 UTC
Hmmm... I looked for monobook.js, and couldn't find it, but then I realised it
is a system message.  The reason I thought it was auto-generated is that the
downloaded file begins with the comment "generated javascript".

I have never touched the system messages, so I assume an error in here must come
from an earlier version.  My upgrade path was 1.3.x -> 1.4.0 -> 1.4.1 -> 1.4.4.

The 'default text' in Special:Allmessages is correct in 1.4.4, so it is no
longer an active bug, but it is perhaps something that needs looking into with
regards to the upgrade process (if that is where the problem lies).

As a side note, I tried to fix the problem by deleting MediaWiki:Monobook.js,
but even though the page is now gone the message list still shows the old value.
 I assume this is a problem with the cache not being rebuilt when a message is
deleted.  Is this something that should be reported as a bug?

Comment 3 Brion Vibber 2005-06-05 04:45:11 UTC
What was your upgrade procedure? (wrt running updaters, etc.)

When did the errors start? Are they recent or have they always been there?

What's your PHP version? Have you ever had obscure and dangerous options such as 
magic_quotes_runtime on?

Is it the message cache that might be stale, or your browser cache? Clear your browser cache and/or 
try a new browser to check the browser cache. *Always* clear the browser cache when checking things 
these; CSS and JS are aggressively cached.

To check the message cache, try in eval.php:
> return $messageMemc->get("$wgDBname:messages");
This will dump the message cache array to the terminal so you can inspect its contents.
Comment 4 Mark Clements (HappyDog) 2005-06-13 12:05:45 UTC
PHP version is 4.1.2 and magic_quotes_* have never been enabled.

I cleared browser cache, and also tried viewing the page in a different browser,
neither of which helped.

note: $wgCachePages is set to false (and I think it always has been).

I only noticed the error when I first reported it here, but it may well have
been present before this.

Using eval.php as you described gives the messages without escaped quotes.

My update procedure was initially non-standard, but I have since stripped back
and run the updater as intended.  This could have caused some problems.  I also
had to move the data between databases, ditto.  Both of these MAY have been the
reason for the initial error (and if no-one else reports a similar problem then
that should perhaps be assumed), but it doesn't explain the current problem that
the quotes are still unescaped after the MediaWiki: page has been deleted.

I tried modifying one of the other system messages, and that change shows up on
Special:Allmessages, but the javascript is still showing the old version (and
marking the diff in pink), so it doesn't _appear_ to be a caching error.

Comment 5 Brion Vibber 2005-11-29 09:42:55 UTC
Gonna go ahead and resolve this unless further info has come up.
Comment 6 Mark Clements (HappyDog) 2005-11-29 10:49:36 UTC
I resolved the problem by copying the expected version of the content for this
message into the wiki page, and as no-one else appears to have been having this
problem, it was probably some idiosyncrasy in my setup.  I am happy with 
WORKSFORME resolution.

However I realised that one of the problems I observed above is still present:
even when the page text is exactly the same as the expected text, it is
highlighted on Special:Allmessages as being different.  

I tested this by checking my newly installed wiki, where no system messages have
been changed at all.  About 30 system messages are flagged in pink as being
changed from the default, even though they appear to be identical in content and
have definitely not been changed from the installation defaults.

I have reported this as a separate bug (bug 4108).

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