Last modified: 2012-09-27 01:10:45 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 T25597, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23597 - Vector breaks display of ===head===
Vector breaks display of ===head===
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-19 18:05 UTC by Conrad Irwin
Modified: 2012-09-27 01:10 UTC (History)
4 users (show)

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


Attachments

Description Conrad Irwin 2010-05-19 18:05:46 UTC
While this problem isn't solvable easily - it would be trivially mitigated by using a different id for #head. (Ideally one that isn't such a common word).

See [[wikt:WT:RFC]] for an example (in vector skin), the word "head" is in the top-right, obscuring the navigation, instead of where it should be.
Comment 1 Platonides 2010-05-19 18:20:52 UTC
=== head === gets id="head", but vector defines a different head id.

The solution would be to rename vector class, to something like vector-head, skin-head....
Comment 2 Conrad Irwin 2010-05-19 18:31:04 UTC
You can hack the visual error by updating the selector to "div#head" in main-ltr.css, I'm not sure if that's good enough - or whether that wants to be done too?
Comment 3 Roan Kattouw 2010-05-19 19:02:17 UTC
Fixed in r66646 using the suggestion from comment #2 for #head and a few other IDs.
Comment 4 Platonides 2010-05-19 23:59:28 UTC
And r66670 for monobook.

It is still invalid html, though.
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-05-21 14:48:02 UTC
The general problem is bug 7356.  This is why *all* new id's should be prefixed with "mw-".  "head" is not a new id, of course, so it didn't follow this policy.  Prefixing with "mw-" means collision by accident is very unlikely, and if it does happen, we can force user-added id's to not start with "mw-" by adding some extra prefix.

There are still lots of other ways to get id conflicts, of course, like

== Title ==
== Title ==
== Title 2 ==

or just <span id="foo"></span><span id="foo"></span>.  There are various bugs open for this, but in general, avoiding all duplicate id's is impractical.
Comment 6 Platonides 2010-05-21 17:38:49 UTC
> "head" is not a new id, of course, so it didn't follow this
> policy.

I'd say it is. Vector hasn't even been released.
I vote for changing it, even if it breaks some user scripts at wikimedia projects.
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-05-21 17:51:00 UTC
Oh, that's right, it is a new id.  In my opinion, it should simply be changed to column-one like Monobook.  Was "column-one" a good choice of id?  No.  Is it the one we've been using for five years?  Yes.  The contents don't match exactly, but put it this way: if you use "column-one", some scripts and styles that affect column-one will break.  If you use "head", then *all* scripts and styles that affect column-one will break.  Seems like a pretty clear tradeoff to me.  But I've said this before.

If Vector really wants its own id for this, at least do mw-head.  Not only are no conflicts likely, it's also much more greppable.
Comment 8 Platonides 2010-05-21 20:13:07 UTC
We could change it to mw_head, which is the one modern has been using for ages (it uses all underscores, though)
Comment 9 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-05-21 20:19:08 UTC
Few enough people use Modern that I'd prefer to avoid the stylistic inconsistency.  We use hyphens everywhere in classes and id's.
Comment 10 Platonides 2010-05-21 20:56:21 UTC
Then we might try to change the mw_ to mw- at modern, too (for 1.17), There are also other 2 insttances: mw_trackbacks and mw_content.
It could go with the skin reestructuring, if that ever happens.

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


Navigation
Links