Moodle
  1. Moodle
  2. MDL-30471

Cannot nest an unordered list inside an ordered list

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.0.7, 2.1.4
    • Component/s: Resource, Themes
    • Labels:
    • Environment:
      qa.moodle.net
    • Testing Instructions:
      Hide
      1. Create a page resource
      2. Click the HTML button to enter HTML source
      3. Enter the code in the description of this bug as the Page content
      4. Click Update
      5. Click Save and display

      Check that the numbered list displays with a bulleted list nested inside.

      Show
      Create a page resource Click the HTML button to enter HTML source Enter the code in the description of this bug as the Page content Click Update Click Save and display Check that the numbered list displays with a bulleted list nested inside.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      33141

      Description

      The rendering of nested lists is not working as expected.

      When a bulleted list is nested inside a numbered list, the bullets become numbers.

      <p>Some text</p>
      <ol>
      <li>Bli</li>
      <li>Bla</li>
      <ul>
      <li>Ha</li>
      <li>Ho</li>
      </ul>
      <li>Blu</li>
      </ol>
      <p>More text.</p>
      <ul>
      <li>Bli</li>
      <li>Bla</li>
      <ol>
      <li>Ha</li>
      <li>Ho</li>
      </ol>
      <li>Blu</li>
      </ul>
      <p>More text.</p>
      

      The same effect can be achieved by creating the lists in the editor or pasting/writing the HTML source.

      The source is maintained correctly between edits, so the problem is how the source is being rendered.

        Issue Links

          Activity

          Hide
          Mary Evans added a comment -

          @Michael

          I think this relates a to an earlier fix I did for course topic/weekly summary pages where there was a bullet/number (disc/decimal) mix up.

          Re-visiting that fix, which I added to the end of theme/base/core.css, I can see now that the ul li and ol li is perhaps causing this problem. By removing ul li and ol li from that earlier patch fixes the problem.

          I tested this hypothesis and it appears to work whether you do this manually (HTML) or using editing tools in the Text Editor for ordered or unordered lists.

          I'll add this patch now and would be grateful if you could test this for me Michael, please?

          Thanks
          Mary

          Show
          Mary Evans added a comment - @Michael I think this relates a to an earlier fix I did for course topic/weekly summary pages where there was a bullet/number (disc/decimal) mix up. Re-visiting that fix, which I added to the end of theme/base/core.css, I can see now that the ul li and ol li is perhaps causing this problem. By removing ul li and ol li from that earlier patch fixes the problem. I tested this hypothesis and it appears to work whether you do this manually (HTML) or using editing tools in the Text Editor for ordered or unordered lists. I'll add this patch now and would be grateful if you could test this for me Michael, please? Thanks Mary
          Hide
          Sam Hemelryk added a comment -

          Thanks Mary - I've integrated this fix now.

          Just noting that the issue isn't actually solved 100% yet as if you copy the code from above into a section description and label you will still see the same issue.

          I'll open a new issue for that now.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks Mary - I've integrated this fix now. Just noting that the issue isn't actually solved 100% yet as if you copy the code from above into a section description and label you will still see the same issue. I'll open a new issue for that now. Cheers Sam
          Hide
          Rossiani Wijaya added a comment -

          I'm not sure what to test on for this issue.

          Comparing the result before and after produce the same output.

          Sam created a new issue to fix the same problem, should I just passed this issue or am I missing something to test here?

          Show
          Rossiani Wijaya added a comment - I'm not sure what to test on for this issue. Comparing the result before and after produce the same output. Sam created a new issue to fix the same problem, should I just passed this issue or am I missing something to test here?
          Hide
          Rossiani Wijaya added a comment -

          Nevermind.

          I didn't purge my cache before testing this, that is why it produces the same output.

          Just have a look again and this is working fine.

          Test passed.

          Show
          Rossiani Wijaya added a comment - Nevermind. I didn't purge my cache before testing this, that is why it produces the same output. Just have a look again and this is working fine. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The master fixes corresponding to this issue have been sent upstream. Fixes for other branches (19, 20, 21 stable) will be sent in the very-next days.

          Thanks for the hard work! Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The master fixes corresponding to this issue have been sent upstream. Fixes for other branches (19, 20, 21 stable) will be sent in the very-next days. Thanks for the hard work! Closing, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: