Moodle
  1. Moodle
  2. MDL-28625

Ordered list resets to zero after the ninth item

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      1. Select Binarius (or any theme which uses Canvas as a parent theme)
      2. Add a numbered list of 20 in any area, be site topic, resource whatever...
      3. Check to see that all double numbers in the list show up.
      4. If you feel up to it create a list of over 100 items to check that 3 figure numbers are displayed fully.
      5. Check that different levels of the lists work correctly too.

      Show
      1. Select Binarius (or any theme which uses Canvas as a parent theme) 2. Add a numbered list of 20 in any area, be site topic, resource whatever... 3. Check to see that all double numbers in the list show up. 4. If you feel up to it create a list of over 100 items to check that 3 figure numbers are displayed fully. 5. Check that different levels of the lists work correctly too.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      18111

      Description

      The rendering of an ordered list resets to zero after the ninth item of the list in a Book Chapter. In addition, an unordered list renders as an ordered list after the reset.

      1. book_chapter.html
        3 kB
        Adi Tedjasaputra
      1. book_screenshot.png
        80 kB
      2. Book_tinyMCE.png
        53 kB

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          The numbers are being cut off by some themes only. Only half of the themes have this problem. mod/page is affected the same way.

          Thanks for the report.

          Show
          Petr Škoda added a comment - The numbers are being cut off by some themes only. Only half of the themes have this problem. mod/page is affected the same way. Thanks for the report.
          Hide
          Michael de Raadt added a comment -

          A workaround is suggested in the duplicate issue.

          The author of the duplicate suggests that the problem lies in the base theme, so perhaps it is something that is being over-ridden in some themes (to correct it) but not others.

          Show
          Michael de Raadt added a comment - A workaround is suggested in the duplicate issue. The author of the duplicate suggests that the problem lies in the base theme, so perhaps it is something that is being over-ridden in some themes (to correct it) but not others.
          Hide
          Mary Evans added a comment - - edited

          Correction...the problem lies in Canvas theme, as not all CORE themes are based on Canvas, thats' probably why some themes work and others not, with respect to this problem.

          I'll take a stab in the dark and say that this is more likely to do with text.css which does change quite a few settings, one way or another. It has been argued that text.css is not really needed. So may be a good time to look at this more closely and perhaps remove it all together.

          Thanks for the heads up on this issue, I must admit I had forgotten about it.

          Cheers
          Mary

          Show
          Mary Evans added a comment - - edited Correction...the problem lies in Canvas theme, as not all CORE themes are based on Canvas, thats' probably why some themes work and others not, with respect to this problem. I'll take a stab in the dark and say that this is more likely to do with text.css which does change quite a few settings, one way or another. It has been argued that text.css is not really needed. So may be a good time to look at this more closely and perhaps remove it all together. Thanks for the heads up on this issue, I must admit I had forgotten about it. Cheers Mary
          Hide
          John Antolak added a comment - - edited

          In my duplicated issue (30396), I found the problem in canvas. For the ordered list, anything that sets the left margin to anything less than 2em will cut off list with more than one digit. The css could just leave the left margin unset. My workaround (currently) is to set the left margin to 2em in canvas (both editor.css and text.css) since I don't expect to ever go over 99 items. In Safari's CSS inspector, simply disabling that one line the css corrected the list appearance. At also affected the appearance of unordered lists too, since it applied to both. There is a similar line in editor.css for the canvas theme as well.

          A comment for the moderators: I entered a duplicate because my initial search did not find this issue. When responding, it might be nice to indicate which issue is the duplicate (it took some time to trace that). Your efforts sorting these issues out are appreciated, though. I'm sure it makes things much easier down the line.

          Show
          John Antolak added a comment - - edited In my duplicated issue (30396), I found the problem in canvas. For the ordered list, anything that sets the left margin to anything less than 2em will cut off list with more than one digit. The css could just leave the left margin unset. My workaround (currently) is to set the left margin to 2em in canvas (both editor.css and text.css) since I don't expect to ever go over 99 items. In Safari's CSS inspector, simply disabling that one line the css corrected the list appearance. At also affected the appearance of unordered lists too, since it applied to both. There is a similar line in editor.css for the canvas theme as well. A comment for the moderators: I entered a duplicate because my initial search did not find this issue. When responding, it might be nice to indicate which issue is the duplicate (it took some time to trace that). Your efforts sorting these issues out are appreciated, though. I'm sure it makes things much easier down the line.
          Hide
          Mary Evans added a comment - - edited

          Hi John,

          Please don't worry about creating duplicate issues, sometimes these little problems are forgotten, like this was, and someone reporting this again gets our attention, the moment the link was made. So thanks for that.

          I've hopefully fixed the problem, which is now been submitted and "Waiting for Integration Review" to Moodle, which you can see at the top of this page under Details.

          The problem with the Canvas theme is that it contains a CSS file (text.css) which in some ways is OK, but in others breaks the way the YUI Library (http://developer.yahoo.com/yui/) CSS works, which, if left to its own devices takes care of most of Moodle CSS settings like OL & UL margins and such.

          With regards to the link between your duplicated version and this, the earlier one always takes precedence, that's why your duplicate issue was closed. If you look at that page you will see that a link was added to this page. The same way that this issues links back to yours. If you scroll up this page you will see "Issue Links" (in a very pale orange colour which is not really that visible) and along side that title you will see "This issue is duplicated by: MDL-30396 (with a line through it indicating that it is now a closed issue.) By the way these MDL number are actual hyperlinks so by CLICKING on the number above takes you to your original link.

          I hope this helps you understand the process?

          Many thanks for your help with this...it is much appreciated.

          Cheers

          Mary

          Show
          Mary Evans added a comment - - edited Hi John, Please don't worry about creating duplicate issues, sometimes these little problems are forgotten, like this was, and someone reporting this again gets our attention, the moment the link was made. So thanks for that. I've hopefully fixed the problem, which is now been submitted and "Waiting for Integration Review" to Moodle, which you can see at the top of this page under Details. The problem with the Canvas theme is that it contains a CSS file (text.css) which in some ways is OK, but in others breaks the way the YUI Library ( http://developer.yahoo.com/yui/ ) CSS works, which, if left to its own devices takes care of most of Moodle CSS settings like OL & UL margins and such. With regards to the link between your duplicated version and this, the earlier one always takes precedence, that's why your duplicate issue was closed. If you look at that page you will see that a link was added to this page. The same way that this issues links back to yours. If you scroll up this page you will see "Issue Links" (in a very pale orange colour which is not really that visible) and along side that title you will see "This issue is duplicated by: MDL-30396 (with a line through it indicating that it is now a closed issue.) By the way these MDL number are actual hyperlinks so by CLICKING on the number above takes you to your original link. I hope this helps you understand the process? Many thanks for your help with this...it is much appreciated. Cheers Mary
          Hide
          Sam Hemelryk added a comment -

          Thanks Mary - this has been integrated now

          Just noting that I automatically generated a list up to 100'000 items to test this. The changes made here fix the problem providing there is less than 3 digits. As soon as the 1000 item is printed the front number(s) are cut again.
          A bit of investigation shows that this is being caused by YUI reset css setting padding to 0. To be truthful I don't think a list with 1000 items will come about too often so I'm not sure we should do anything about it.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks Mary - this has been integrated now Just noting that I automatically generated a list up to 100'000 items to test this. The changes made here fix the problem providing there is less than 3 digits. As soon as the 1000 item is printed the front number(s) are cut again. A bit of investigation shows that this is being caused by YUI reset css setting padding to 0. To be truthful I don't think a list with 1000 items will come about too often so I'm not sure we should do anything about it. Cheers Sam
          Hide
          Sam Hemelryk added a comment -

          Tested during integration

          Show
          Sam Hemelryk added a comment - Tested during integration
          Hide
          Mary Evans added a comment -

          Thanks Sam!

          Trust you to go over the top testing!

          Cheers
          Mary

          Show
          Mary Evans added a comment - Thanks Sam! Trust you to go over the top testing! Cheers Mary
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: