Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.6, 2.2.3, 2.3
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Wiki (2.x)
    • Labels:
    • Environment:
      any
    • Testing Instructions:
      Hide

      1. Create a wiki.
      2. Edit a page and include header (h1) elements.
      3. Jump within the Wiki page using the TOC.
      4. You should be able to jump to the heading (h1) text that you clicked on from the TOC.

      5. You might want to purge all caches.

      Show
      1. Create a wiki. 2. Edit a page and include header (h1) elements. 3. Jump within the Wiki page using the TOC. 4. You should be able to jump to the heading (h1) text that you clicked on from the TOC. – 5. You might want to purge all caches.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-25695-master

      Description

      If text is formated as H1 a Toc is created on top of the wiki page. The text of headline is created as a link, But it didn't jump to the element in the page.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              ralfh Ralf Hilgenstock created issue -
              dougiamas Martin Dougiamas made changes -
              Field Original Value New Value
              Workflow jira [ 40921 ] MDL Workflow [ 47369 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Hi Ralf, can you plz comment a bit more about the meaningful wiki/page settings to reproduce this? html/wiki format, example contents to reproduce, anything special... TIA!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Hi Ralf, can you plz comment a bit more about the meaningful wiki/page settings to reproduce this? html/wiki format, example contents to reproduce, anything special... TIA!
              Hide
              ralfh Ralf Hilgenstock added a comment -

              Sure. I use HTML format. After saving a page with H1-formatting a anchor link in the page is created, but is doesn't work. If you click at the link to the second headline it should jump to the place at the page. But it didn't

              Show
              ralfh Ralf Hilgenstock added a comment - Sure. I use HTML format. After saving a page with H1-formatting a anchor link in the page is created, but is doesn't work. If you click at the link to the second headline it should jump to the place at the page. But it didn't
              ralfh Ralf Hilgenstock made changes -
              Attachment wiki.png [ 22635 ]
              Hide
              signsmj@millsaps.edu Molly McManus added a comment -

              I'm seeing the same thing in our test.

              Show
              signsmj@millsaps.edu Molly McManus added a comment - I'm seeing the same thing in our test.
              Hide
              signsmj@millsaps.edu Molly McManus added a comment -

              seeing this in all three wiki formats

              Show
              signsmj@millsaps.edu Molly McManus added a comment - seeing this in all three wiki formats
              Hide
              cfulton Charles Fulton added a comment -

              I'm poking at this; there are no anchor tags being generated in the body of the text.

              Show
              cfulton Charles Fulton added a comment - I'm poking at this; there are no anchor tags being generated in the body of the text.
              Hide
              cfulton Charles Fulton added a comment -

              Correction: there are empty anchor tags without names.

              Show
              cfulton Charles Fulton added a comment - Correction: there are empty anchor tags without names.
              Hide
              cfulton Charles Fulton added a comment -

              As I suspected HTMPurifier is stripping out the anchors. Adding a directive to weblib.php seems to correct the behavior.

              Show
              cfulton Charles Fulton added a comment - As I suspected HTMPurifier is stripping out the anchors. Adding a directive to weblib.php seems to correct the behavior.
              cfulton Charles Fulton made changes -
              Attachment mdl-25695-noanchors.patch [ 22744 ]
              Show
              cfulton Charles Fulton added a comment - Patch here: https://github.com/mackensen/moodle/commit/25dfafe0159e5a64bc85969e68d3f7f6dea639f4 .
              dougiamas Martin Dougiamas made changes -
              Workflow MDL Workflow [ 47369 ] MDL Full Workflow [ 75511 ]
              cfulton Charles Fulton made changes -
              Link This issue has been marked as being related by MDL-27761 [ MDL-27761 ]
              tsala Helen Foster made changes -
              Assignee Ludo's dfwikiteam [ dfwikiteam ] Ludo ( Marc Alier) [ granludo ]
              Hide
              sunner Sunner Sun added a comment - - edited

              I meet the same problem in Moodle 2.1.1 and Charles's patch does work (do not forget to purge cache)! Thanks!

              The patch is simple. It just set a flag in purify_html(). Why not merge it ASAP?

              Show
              sunner Sunner Sun added a comment - - edited I meet the same problem in Moodle 2.1.1 and Charles's patch does work (do not forget to purge cache)! Thanks! The patch is simple. It just set a flag in purify_html(). Why not merge it ASAP?
              cfulton Charles Fulton made changes -
              Assignee Ludo ( Marc Alier) [ granludo ] Charles Fulton [ cfulton ]
              Hide
              cfulton Charles Fulton added a comment -

              Verified that this is still an issue in 2.3dev.

              Show
              cfulton Charles Fulton added a comment - Verified that this is still an issue in 2.3dev.
              cfulton Charles Fulton made changes -
              Pull Master Diff URL https://github.com/mackensen/moodle/compare/master...MDL-25695-master
              Pull Master Branch MDL-25695-master
              Testing Instructions 1. Create a wiki.
              2. Edit a page and include header (h1) elements.
              3. Jump within the page.
              Pull 2.2 Diff URL https://github.com/mackensen/moodle/compare/MOODLE_22_STABLE...MDL-25695-22
              Pull 2.1 Branch MDL-25695-21
              Pull 2.2 Branch MDL-25695-22
              Pull 2.1 Diff URL https://github.com/mackensen/moodle/compare/MOODLE_21_STABLE...MDL-25695-21
              Pull from Repository https://github.com/mackensen/moodle
              Labels patch tracking
              Affects Version/s 2.2 [ 10656 ]
              Affects Version/s 2.1.5 [ 11553 ]
              Affects Version/s 2.3 [ 10657 ]
              cfulton Charles Fulton made changes -
              Status Open [ 1 ] Waiting for peer review [ 10012 ]
              mayank_gupta2005 Mayank Gupta made changes -
              Original Estimate 0 minutes [ 0 ]
              Remaining Estimate 0 minutes [ 0 ]
              Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
              Peer reviewer mayank_gupta2005
              Hide
              mayank_gupta2005 Mayank Gupta added a comment -

              Looks fine.
              Tested it as well. Works great.

              Thanks,
              Mayank.

              Show
              mayank_gupta2005 Mayank Gupta added a comment - Looks fine. Tested it as well. Works great. Thanks, Mayank.
              mayank_gupta2005 Mayank Gupta made changes -
              Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
              mayank_gupta2005 Mayank Gupta made changes -
              Testing Instructions 1. Create a wiki.
              2. Edit a page and include header (h1) elements.
              3. Jump within the page.
              1. Create a wiki.
              2. Edit a page and include header (h1) elements.
              3. Jump within the Wiki page using the TOC.
              --
              4. You might want to purge all caches.
              mayank_gupta2005 Mayank Gupta made changes -
              Testing Instructions 1. Create a wiki.
              2. Edit a page and include header (h1) elements.
              3. Jump within the Wiki page using the TOC.
              --
              4. You might want to purge all caches.
              1. Create a wiki.
              2. Edit a page and include header (h1) elements.
              3. Jump within the Wiki page using the TOC.
              4. You should be able to jump to the heading (h1) text that you clicked on from the TOC.
              --
              5. You might want to purge all caches.
              Hide
              justins Justin Sossin added a comment -

              I added the additional line of code "$config->set('Attr.EnableID', true);" within the weblib.php file located within \server\moodle\lib\ directory in the specific location pointed out in https://github.com/mackensen/moodle/compare/MOODLE_21_STABLE...MDL-25695-21. Restarted the moodle, cleared my browsers cache and the TOC(table of contents) links are working.

              Show
              justins Justin Sossin added a comment - I added the additional line of code "$config->set('Attr.EnableID', true);" within the weblib.php file located within \server\moodle\lib\ directory in the specific location pointed out in https://github.com/mackensen/moodle/compare/MOODLE_21_STABLE...MDL-25695-21 . Restarted the moodle, cleared my browsers cache and the TOC(table of contents) links are working.
              cfulton Charles Fulton made changes -
              Fix Version/s 2.3 [ 10657 ]
              cfulton Charles Fulton made changes -
              Status Development in progress [ 3 ] Open [ 1 ]
              poltawski Dan Poltawski made changes -
              Status Open [ 1 ] Peer review in progress [ 10013 ]
              Peer reviewer mayank_gupta2005 poltawski
              Hide
              poltawski Dan Poltawski added a comment -

              Hi Charles,

              Not sure this is the right solution, as a few lines below we have:

              if ($type === 'allowid') {
                   $config->set('Attr.EnableID', true);
              }

              cheers,
              dan

              Show
              poltawski Dan Poltawski added a comment - Hi Charles, Not sure this is the right solution, as a few lines below we have: if ($type === 'allowid') { $config->set('Attr.EnableID', true); } cheers, dan
              poltawski Dan Poltawski made changes -
              Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
              Hide
              cfulton Charles Fulton added a comment -

              Amended based on the fix provided in MDL-26423 (thanks Dan, I hadn't noticed that development).

              Show
              cfulton Charles Fulton added a comment - Amended based on the fix provided in MDL-26423 (thanks Dan, I hadn't noticed that development).
              cfulton Charles Fulton made changes -
              Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
              cfulton Charles Fulton made changes -
              Link This issue will be resolved by MDL-26423 [ MDL-26423 ]
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Charles, sorry I didn't see this quicker.

              Submitting for integration

              Show
              poltawski Dan Poltawski added a comment - Thanks Charles, sorry I didn't see this quicker. Submitting for integration
              poltawski Dan Poltawski made changes -
              Status Waiting for peer review [ 10012 ] Waiting for integration review [ 10010 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              nebgor Aparup Banerjee made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Integrator nebgor
              Currently in integration Yes [ 10041 ]
              Hide
              nebgor Aparup Banerjee added a comment -

              Thanks, the patch has been integrated into 21, 22 and master for testing.

              Show
              nebgor Aparup Banerjee added a comment - Thanks, the patch has been integrated into 21, 22 and master for testing.
              nebgor Aparup Banerjee made changes -
              Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
              Affects Version/s 2.2.3 [ 12053 ]
              Affects Version/s 2.1.6 [ 12052 ]
              Affects Version/s 2.2 [ 10656 ]
              Affects Version/s 2.1.5 [ 11553 ]
              Fix Version/s 2.1.7 [ 12161 ]
              Fix Version/s 2.2.4 [ 12162 ]
              Fix Version/s 2.3 [ 10657 ]
              abgreeve Adrian Greeve made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              Tester abgreeve
              Hide
              abgreeve Adrian Greeve added a comment -

              Tested with version 2.1, 2.2 and master. Navigation through the table of contents now works, though html only created links for heading 1. The other formats create linked headings that navigate properly.
              Thanks.

              Show
              abgreeve Adrian Greeve added a comment - Tested with version 2.1, 2.2 and master. Navigation through the table of contents now works, though html only created links for heading 1. The other formats create linked headings that navigate properly. Thanks.
              abgreeve Adrian Greeve made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              U P S T R E A M I Z E D !

              Many thanks for the hard work, closing this as fixed.

              Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - U P S T R E A M I Z E D ! Many thanks for the hard work, closing this as fixed. Ciao
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Tested [ 10006 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Currently in integration Yes [ 10041 ]
              Integration date 19/May/12
              poltawski Dan Poltawski made changes -
              Labels patch tracking patch triaged
              cfulton Charles Fulton made changes -
              Link This issue will help resolve MDL-28616 [ MDL-28616 ]

                People

                • Votes:
                  8 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12