Description

A change was added to Moin 1.6 to output two Trivial Change text boxes. The new checkbox was placed near the Save button on the top of the page (on most themes). Both check boxes contain the chktrivial ID (IDs should be unique):

<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">

If you are using Firefox HTML Validator, you may not see a CSS error message because the upper checkbox is created with a Javascript document.write.

Steps to reproduce

  1. Edit this page.
  2. View source.
  3. search for id="chktrivial"

Example

Themes that modify the edit page (the fixedleft contributed theme hides the Save, Preview,... buttons and places replacement buttons on the side) can not hide the display of the new check box because of the duplicate IDs. As a result, wacko IE7 shifts the textarea edit box off to the right. Providing a unique ID allows the upper checkbox and label to be hidden with CSS rules and makes IE7 happy.

Component selection

Details

MoinMoin Version

1.6.1

OS and Version

Ubuntu 7.1, Vista

Python Version

2.4, 2.5

Server Setup

Apache

Server Details

mod_python

Language you are using the wiki in (set in the browser/UserPreferences)

en

Workaround

Modify PageEditor.py to create a unique ID.

407,408c407
<     document.write('<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">');
<     document.write('<label for="chktrivial">%(label)s</label>');
---
> 
410c409,411
< </script> ''' % {
---
> </script> 
> <input type="checkbox" name="trivial" id="chktrivial2" value="1" %(checked)s onclick="toggle_trivial(this)">
> <label for="chktrivial2" id="chktrivial3" >%(label)s</label>''' % {

Modify PageGraphicalEditor.py to create a unique ID:

297,301c297,300
< </script>
< &nbsp;
< <input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">
< <label for="chktrivial">%(label)s</label>
< ''' % {
---
>     //-->
> </script> 
> <input type="checkbox" name="trivial" id="chktrivial2" value="1" %(checked)s onclick="toggle_trivial(this)">
> <label for="chktrivial2" id="chktrivial3" >%(label)s</label>''' % {

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/TrivialChangeDuplicateId (last edited 2008-03-02 16:21:02 by RogerHaase)