Last modified: 2010-05-15 15:29:26 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 T2266, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 266 - Headers from templates given wrong IDs
Headers from templates given wrong IDs
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: River Tarnell
: 543 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2004-09-01 02:58 UTC by Chris Wood
Modified: 2010-05-15 15:29 UTC (History)
3 users (show)

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


Description Chris Wood 2004-09-01 02:58:47 UTC
If you include a template with headers in an article with it's own headers, the
headers from the templates have the wrong IDs, like this:
==Header in article (id="1")==
==Header from template (id="1")==
==Header2 from template (id="2")==
==Header2 in article (id="2")==

...which leads to unexpected results when clicking on the edit link to a section
(you may be sent to edit a completely different section).

Is this possible to fix? If not, we should probably disallow headers in templates...

I've marked this as major because, although it has a workaround, users may not
realise what has happened, leading to inadvertent screw-ups...
Comment 1 Chris Wood 2004-09-09 01:56:19 UTC
(Sorry, marked wrong bug as resolved)
Comment 2 Muke Tever 2004-09-15 00:43:50 UTC
Note also that if there isn't a native header corresponding to the template's bogus ID; e.
g. the article is like this--

==Header in article (id="1")==
==Header from template (id="1")==
==Header2 from template (id="2")==

--the user clicking the [edit] link for the header with id 2 will be presented with an 
empty edit box.  

Either the included page shouldn't generate [edit] links, or the [edit] links should point 
to the included page directly (in which case the user must be informed his edits could 
affect many pages).  
Comment 3 JeLuF 2004-09-18 21:37:51 UTC
Fixed in CVS HEAD and REL1_3. See Bug 60
Comment 4 River Tarnell 2004-09-21 02:38:25 UTC
This isn't fixed, but the behaviour is wrong in a different way.  The edit links
are now numbered 1, 2, 3, 4... as if they were all in the article.  See
Comment 5 River Tarnell 2004-09-21 02:39:00 UTC
*** Bug 543 has been marked as a duplicate of this bug. ***
Comment 6 River Tarnell 2004-09-21 04:48:13 UTC
Now fixed in 1.3, 1.4 and live on WP.
Comment 7 River Tarnell 2005-05-22 16:23:32 UTC

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