Moodle
  1. Moodle
  2. MDL-18645 IE8 meta issues
  3. MDL-18232

"Section LInks" block does NOT work with IE8 (RC1)

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7
    • Fix Version/s: 1.9.10
    • Component/s: Blocks
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I guess somehow IE8 (RC1) doesn't like <a href="#section-x">x</a> then? Not sure why...

      Replace x with a number.

      My initial research found this:
      http://lists.w3.org/Archives/Public/www-archive/2008Mar/0007.html

      Martin as you seem to be the one who touched this code recently, maybe you could take a look when you get a chance? Thanks!

        Gliffy Diagrams

        1. 20100924_MDL-18232_2.0.patch
          2 kB
          Rossiani Wijaya
        2. fix.txt
          0.8 kB
          Matthew Davidson
        3. ie8_section_links.patch
          1 kB
          Paul Ortman

          Activity

          Hide
          Ryan Smith added a comment -

          Internet Explorer 8 is now final and available for download. I was just able to reproduce this bug with IE8 final.

          Can this be fixed soon? Section Links don't work at all. Thanks!

          Show
          Ryan Smith added a comment - Internet Explorer 8 is now final and available for download. I was just able to reproduce this bug with IE8 final. Can this be fixed soon? Section Links don't work at all. Thanks!
          Hide
          Mauno Korpelainen added a comment -

          Also section links work ok now with my Windows Vista IE8 stable - http://tracker.moodle.org/browse/MDL-18645

          Show
          Mauno Korpelainen added a comment - Also section links work ok now with my Windows Vista IE8 stable - http://tracker.moodle.org/browse/MDL-18645
          Hide
          Ryan Smith added a comment -

          Section links aren't working on IE8 release in Vista. When you click a section number nothing happens.

          They do work in IE8 if you're running in compatibility mode. Check and make sure you have compatibility mode off.

          Show
          Ryan Smith added a comment - Section links aren't working on IE8 release in Vista. When you click a section number nothing happens. They do work in IE8 if you're running in compatibility mode. Check and make sure you have compatibility mode off.
          Hide
          Matthew Davidson added a comment -

          fixed:

          The problem is an IE8 problem where you can't have named anchors to blank sections. aka

          Won't work.
          <a id="gohere"></a>
          <a href="#gohere">Go There</a>

          Will work
          <a id="gohere">HERE</a>
          <a href="#gohere">Go There</a>

          To fix this issue. Go to the line in format.php and change the id="section-'.$section.'" from the <tr> element to the <td> element. The <td> element will always have "stuff" in it but the <tr> will not.

          Show
          Matthew Davidson added a comment - fixed: The problem is an IE8 problem where you can't have named anchors to blank sections. aka Won't work. <a id="gohere"></a> <a href="#gohere">Go There</a> Will work <a id="gohere">HERE</a> <a href="#gohere">Go There</a> To fix this issue. Go to the line in format.php and change the id="section-'.$section.'" from the <tr> element to the <td> element. The <td> element will always have "stuff" in it but the <tr> will not.
          Show
          Matthew Davidson added a comment - http://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=364427
          Hide
          Ryan Smith added a comment -

          This fix works for me in IE8 on my test server. Thanks Matthew!

          Show
          Ryan Smith added a comment - This fix works for me in IE8 on my test server. Thanks Matthew!
          Hide
          Mauno Korpelainen added a comment -

          This is an interesting point.

          http://www.w3.org/TR/html4/struct/links.html#h-12.2 tells

          "Note. User agents should be able to find anchors created by empty A elements, but some fail to do so."

          IE8 looks more and more like IE6 or IE5...

          Show
          Mauno Korpelainen added a comment - This is an interesting point. http://www.w3.org/TR/html4/struct/links.html#h-12.2 tells "Note. User agents should be able to find anchors created by empty A elements, but some fail to do so." IE8 looks more and more like IE6 or IE5...
          Hide
          Matthew Davidson added a comment -

          Like it or not Internet Explorer isn't going away any time soon. IE6 was a nightmare for everyone but it is still in use today by a lot of users. There are a lot of things that don't work in IE6 the way they are supposed to but you can't just cut them off. Eventually (hopefully), IE will go the way of Netscape and fade into the night, but until then it is the standard default browser for Windows machines and it will eventually be updated through Windows Updates. Might as well deal with it now if you can instead of 1. Waiting for MS to fix it (good luck) or 2. Ask the everyday user to stumble upon a registry fix.

          Show
          Matthew Davidson added a comment - Like it or not Internet Explorer isn't going away any time soon. IE6 was a nightmare for everyone but it is still in use today by a lot of users. There are a lot of things that don't work in IE6 the way they are supposed to but you can't just cut them off. Eventually (hopefully), IE will go the way of Netscape and fade into the night, but until then it is the standard default browser for Windows machines and it will eventually be updated through Windows Updates. Might as well deal with it now if you can instead of 1. Waiting for MS to fix it (good luck) or 2. Ask the everyday user to stumble upon a registry fix.
          Hide
          Paul Ortman added a comment -

          Wanted to ping this issue and note that I tweaked the suggested patch a bit to keep HTML names and id more internally consistent on the page. We were definitely getting bit by the lack of fix.

          Attached is patch that we're using in production and seems to work just fine in IE8 and Firefox.

          Show
          Paul Ortman added a comment - Wanted to ping this issue and note that I tweaked the suggested patch a bit to keep HTML names and id more internally consistent on the page. We were definitely getting bit by the lack of fix. Attached is patch that we're using in production and seems to work just fine in IE8 and Firefox.
          Hide
          Ken Gibson added a comment -

          The suggested change of these lines in format.php:

          Before:
          echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
          echo '<td class="left side"> '.$currenttext.'</td>';

          After:
          echo '<tr class="section main'.$sectionstyle.'">';
          echo '<td id="section-'.$section.'" class="left side"> '.$currenttext.'</td>';

          Does fix the empty tag for IE8 issue.

          But, it breaks the sharing cart block locations for all sections>0. To fix this, I added a NEW ID for the section links (see below).
          To fix this, without breaking sharing cart:

          Before in format.php:
          echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
          echo '<td class="left side"> '.$currenttext.'</td>';

          After in forma.php:
          echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
          echo '<td id="sectionblock-'.$section.'" class="left side"> '.$currenttext.'</td>';

          then in blocks/section_links/block_section_links.php
          change line 76 from:

          $link = '#section-';
          to
          $link = '#sectionblock-';

          In summary - DON'T touch:
          echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">';
          as the sharing cart block needs it

          Just a change:
          echo '<td class="left side"> '.$currenttext.'</td>';
          to
          echo '<td id="sectionblock-'.$section.'" class="left side"> '.$currenttext.'</td>';
          adding a new ID to it (i called it sectionblock) and then edit your sectionlinks block to look for this ID.

          Show
          Ken Gibson added a comment - The suggested change of these lines in format.php: Before: echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">'; echo '<td class="left side"> '.$currenttext.'</td>'; After: echo '<tr class="section main'.$sectionstyle.'">'; echo '<td id="section-'.$section.'" class="left side"> '.$currenttext.'</td>'; Does fix the empty tag for IE8 issue. But, it breaks the sharing cart block locations for all sections>0. To fix this, I added a NEW ID for the section links (see below). To fix this, without breaking sharing cart: Before in format.php: echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">'; echo '<td class="left side"> '.$currenttext.'</td>'; After in forma.php: echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">'; echo '<td id="sectionblock-'.$section.'" class="left side"> '.$currenttext.'</td>'; then in blocks/section_links/block_section_links.php change line 76 from: $link = '#section-'; to $link = '#sectionblock-'; In summary - DON'T touch: echo '<tr id="section-'.$section.'" class="section main'.$sectionstyle.'">'; as the sharing cart block needs it Just a change: echo '<td class="left side"> '.$currenttext.'</td>'; to echo '<td id="sectionblock-'.$section.'" class="left side"> '.$currenttext.'</td>'; adding a new ID to it (i called it sectionblock) and then edit your sectionlinks block to look for this ID.
          Hide
          Martin Dougiamas added a comment -

          Something for your queue, Rosie, thanks!

          Show
          Martin Dougiamas added a comment - Something for your queue, Rosie, thanks!
          Hide
          Rossiani Wijaya added a comment -

          Thank you everyone for the feedback.

          Apply Ken's suggestion to topics and weekly format file.

          Commit changes to 1.9 stable.

          Show
          Rossiani Wijaya added a comment - Thank you everyone for the feedback. Apply Ken's suggestion to topics and weekly format file. Commit changes to 1.9 stable.
          Hide
          Rossiani Wijaya added a comment -

          Resolve.

          Show
          Rossiani Wijaya added a comment - Resolve.

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: