Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

        1. mdl-25695-noanchors.patch
          0.6 kB
          Charles Fulton
        1. wiki.png
          28 kB

          Issue Links

            Activity

            Ralf Hilgenstock created issue -
            Martin Dougiamas made changes -
            Field Original Value New Value
            Workflow jira [ 40921 ] MDL Workflow [ 47369 ]
            Hide
            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
            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
            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
            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
            Ralf Hilgenstock made changes -
            Attachment wiki.png [ 22635 ]
            Hide
            Molly McManus added a comment -

            I'm seeing the same thing in our test.

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

            seeing this in all three wiki formats

            Show
            Molly McManus added a comment - seeing this in all three wiki formats
            Hide
            Charles Fulton added a comment -

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

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

            Correction: there are empty anchor tags without names.

            Show
            Charles Fulton added a comment - Correction: there are empty anchor tags without names.
            Hide
            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
            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.
            Charles Fulton made changes -
            Attachment mdl-25695-noanchors.patch [ 22744 ]
            Show
            Charles Fulton added a comment - Patch here: https://github.com/mackensen/moodle/commit/25dfafe0159e5a64bc85969e68d3f7f6dea639f4 .
            Martin Dougiamas made changes -
            Workflow MDL Workflow [ 47369 ] MDL Full Workflow [ 75511 ]
            Charles Fulton made changes -
            Link This issue has been marked as being related by MDL-27761 [ MDL-27761 ]
            Helen Foster made changes -
            Assignee Ludo's dfwikiteam [ dfwikiteam ] Ludo ( Marc Alier) [ granludo ]
            Hide
            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 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?
            Charles Fulton made changes -
            Assignee Ludo ( Marc Alier) [ granludo ] Charles Fulton [ cfulton ]
            Hide
            Charles Fulton added a comment -

            Verified that this is still an issue in 2.3dev.

            Show
            Charles Fulton added a comment - Verified that this is still an issue in 2.3dev.
            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 ]
            Charles Fulton made changes -
            Status Open [ 1 ] Waiting for peer review [ 10012 ]
            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 Gupta added a comment -

            Looks fine.
            Tested it as well. Works great.

            Thanks,
            Mayank.

            Show
            Mayank Gupta added a comment - Looks fine. Tested it as well. Works great. Thanks, Mayank.
            Mayank Gupta made changes -
            Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
            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 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
            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
            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.
            Charles Fulton made changes -
            Fix Version/s 2.3 [ 10657 ]
            Charles Fulton made changes -
            Status Development in progress [ 3 ] Open [ 1 ]
            Dan Poltawski made changes -
            Status Open [ 1 ] Peer review in progress [ 10013 ]
            Peer reviewer mayank_gupta2005 poltawski
            Hide
            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
            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
            Dan Poltawski made changes -
            Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
            Hide
            Charles Fulton added a comment -

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

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

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

            Submitting for integration

            Show
            Dan Poltawski added a comment - Thanks Charles, sorry I didn't see this quicker. Submitting for integration
            Dan Poltawski made changes -
            Status Waiting for peer review [ 10012 ] Waiting for integration review [ 10010 ]
            Hide
            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
            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
            Aparup Banerjee made changes -
            Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
            Integrator nebgor
            Currently in integration Yes [ 10041 ]
            Hide
            Aparup Banerjee added a comment -

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

            Show
            Aparup Banerjee added a comment - Thanks, the patch has been integrated into 21, 22 and master for testing.
            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 ]
            Adrian Greeve made changes -
            Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
            Tester abgreeve
            Hide
            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
            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.
            Adrian Greeve made changes -
            Status Testing in progress [ 10011 ] Tested [ 10006 ]
            Hide
            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
            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
            Eloy Lafuente (stronk7) made changes -
            Status Tested [ 10006 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Currently in integration Yes [ 10041 ]
            Integration date 19/May/12
            Dan Poltawski made changes -
            Labels patch tracking patch triaged
            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: