Last modified: 2011-03-13 18:06:39 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 T9205, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7205 - Bolding causes CategoryTree to not render
Bolding causes CategoryTree to not render
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
CategoryTree (Other open bugs)
unspecified
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-02 08:19 UTC by Titoxd
Modified: 2011-03-13 18:06 UTC (History)
1 user (show)

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


Attachments

Description Titoxd 2006-09-02 08:19:58 UTC
Adding <categorytree>Category</categorytree> to a page causes the category tree
to render, as expected, but typing '''<categorytree>Category</categorytree>''',
to try to make the region bold, causes the tree to not open. The tree also fails
to open when the [+] to its left is clicked.
Comment 1 Daniel Kinzler 2006-09-02 09:24:57 UTC
Hm, I'm afraid this can't really be fixed: the core of the problem is that
'''<categorytree>Category</categorytree>''' will produce invalid HTML. The '''
creates <b> tags, which are "inline elements", <categorytree> produces a <div>,
which is a block element - the result is something like <b><div>....</div></b>.
HTML block elements are not allowed inside inline elements (it doesn't make sense).

MediaWiki uses the "tidy" tool to clean up HTML before output, which tries to
fix this "smartly" by moving the <b>...</b> tags inside the <div>. This however
changes the tag structure of the categorytree output, which the JS code relies
on - the JS code can't find the <div> tag to fill with results from the AJAX
call, triggering a JS error (div has no properties). I tried to turn off tidy,
but then my firefox tried to "fix" the broken HTML structure (DOM) itself, with
similar results as with tidy enabled.

Basically, this problem always exists if you try to apply inline formating like
''' to block elements. Usually, tidy fixes it more or less, but sometimes it
screws things up even more - especially in conjunction with JS code. I don't see
a way to change that - IMHO tidy (and the browser) should just dicard the <b>
tags instead of moving them around and second guessing the user.

The solution to get the tree bold is simple though: <categorytree
style="font-weight:bold">Category</categorytree>. You can apply any CSS style to
the tree this way. If someone has a great idea on how to avoid breakage due to
inline elements wrapping the tree's div, please let me know.
Comment 2 Daniel Kinzler 2007-09-13 11:35:37 UTC
no feedback in a year, simple workaround provided. closing as WONTFIX

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


Navigation
Links