Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25883

Wiki Comments HTML Editor Broken

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      Note: You need firebug/ developer tool for checking JS errors.

      1. Log in as Admin and turn editing on
      2. Select a course and add a wiki activity
      3. Select wiki activity and add a new Creole format page
      4. Click on comments tab and then click on add comment
      5. Open error console to check for javascript errors
      6. Type text and select/highlight text in comment box
      7. click on bold icon and you should not see any javascript error. Also ** should be suffixed and prefixed to selected text.

      Repeat above steps for NWIKI page format as well.

      Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.

      Show
      Note: You need firebug/ developer tool for checking JS errors. Log in as Admin and turn editing on Select a course and add a wiki activity Select wiki activity and add a new Creole format page Click on comments tab and then click on add comment Open error console to check for javascript errors Type text and select/highlight text in comment box click on bold icon and you should not see any javascript error. Also ** should be suffixed and prefixed to selected text. Repeat above steps for NWIKI page format as well. Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-25883-master

      Description

      The HTML editor for wiki comments doesn't work. If you highlight text and click on any of the editor buttons, nothing happens.
      It produces the following javascript error: document.forms.mform1 is undefined
      Source File: http://moodle2.clamp-it.org/lib/javascript.php?file=%2Fmod%2Fwiki%2Feditors%2Fwiki%2Fbuttons.js&rev=160
      Line: 2

      The form ID is "wikiform" but the script references the id "mform1".

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              bennettj Jason Bennett created issue -
              Hide
              cfulton Charles Fulton added a comment -

              I've reproduced this leaving a comment for both Creole and NWiki pages; HTML appears to be fine.

              Show
              cfulton Charles Fulton added a comment - I've reproduced this leaving a comment for both Creole and NWiki pages; HTML appears to be fine.
              Hide
              cfulton Charles Fulton added a comment -

              This appears to be an outdated reference in wiki_editor.php. I've posted what ought to be a quick fix with no downstream effects.

              Show
              cfulton Charles Fulton added a comment - This appears to be an outdated reference in wiki_editor.php. I've posted what ought to be a quick fix with no downstream effects.
              cfulton Charles Fulton made changes -
              Field Original Value New Value
              Attachment mdl25883_fixform.patch [ 22743 ]
              dougiamas Martin Dougiamas made changes -
              Workflow MDL Workflow [ 66660 ] MDL Full Workflow [ 75602 ]
              Hide
              cfulton Charles Fulton added a comment -

              This is still broken in 2.1 and is a blocker for MDL-28101. Patch here: https://github.com/mackensen/moodle/compare/master...mdl-25883.

              Show
              cfulton Charles Fulton added a comment - This is still broken in 2.1 and is a blocker for MDL-28101 . Patch here: https://github.com/mackensen/moodle/compare/master...mdl-25883 .
              cfulton Charles Fulton made changes -
              Link This issue blocks MDL-28101 [ MDL-28101 ]
              bennettj Jason Bennett made changes -
              Affects Version/s 2.1 [ 10370 ]
              Hide
              cfulton Charles Fulton added a comment -

              This is still broken in all versions of 2.

              Show
              cfulton Charles Fulton added a comment - This is still broken in all versions of 2.
              cfulton Charles Fulton made changes -
              Pull Master Diff URL https://github.com/mackensen/moodle/compare/master...MDL-25883-master
              Pull Master Branch MDL-25883-master
              Pull 2.0 Diff URL https://github.com/mackensen/moodle/compare/MOODLE_20_STABLE...MDL-25883-20
              Pull 2.0 Branch MDL-25883-20
              Testing Instructions 1. Create a wiki.
              2. Add a page of either the NWIKI or Creole format.
              3. Add a comment. Highlight some text and attempt to use any of the rich text features.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              Database MySQL [ 10001 ] Any [ 10000 ]
              Pull 2.2 Diff URL https://github.com/mackensen/moodle/compare/MOODLE_22_STABLE...MDL-25883-22
              Pull 2.1 Branch MDL-25883-21
              Pull 2.2 Branch MDL-25883-22
              Pull 2.1 Diff URL https://github.com/mackensen/moodle/compare/MOODLE_21_STABLE...MDL-25883-21
              Pull from Repository https://github.com/mackensen/moodle
              Affects Version/s 2.0.8 [ 11554 ]
              Affects Version/s 2.1.5 [ 11553 ]
              Affects Version/s 2.2.2 [ 11552 ]
              Affects Version/s 2.3 [ 10657 ]
              Affects Version/s 2.1 [ 10370 ]
              Difficulty Easy [ 10023 ]
              Component/s Wiki (2.x) [ 10304 ]
              cfulton Charles Fulton made changes -
              Labels patch triaged
              salvetore Michael de Raadt made changes -
              Fix Version/s STABLE Sprint 17 [ 11550 ]
              Affects Version/s 2.2.1 [ 11456 ]
              Affects Version/s 2.0.7 [ 11451 ]
              Affects Version/s 2.3 [ 10657 ]
              Affects Version/s 2.2.2 [ 11552 ]
              Affects Version/s 2.1.5 [ 11553 ]
              Affects Version/s 2.0.8 [ 11554 ]
              moodle.com moodle.com made changes -
              Assignee moodle.com [ moodle.com ] Rajesh Taneja [ rajeshtaneja ]
              rajeshtaneja Rajesh Taneja made changes -
              Status Open [ 1 ] Development in progress [ 3 ]
              Hide
              rajeshtaneja Rajesh Taneja added a comment - - edited

              Thanks for spot-on patch Charles

              Pushing it through process.

              Show
              rajeshtaneja Rajesh Taneja added a comment - - edited Thanks for spot-on patch Charles Pushing it through process.
              rajeshtaneja Rajesh Taneja made changes -
              Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
              rajeshtaneja Rajesh Taneja made changes -
              Testing Instructions 1. Create a wiki.
              2. Add a page of either the NWIKI or Creole format.
              3. Add a comment. Highlight some text and attempt to use any of the rich text features.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              Note: You need firebug/ developer tool to test this.

              # Log in as Admin and turn editing on
              # Select a course and add a wiki activity
              # Select wiki activity and add a new Creole format page
              # Click on comments tab and then click on add comment
              # Open error console to check for javascript errors
              # Type text and select/highlight text in comment box
              # click on bold icon and you should not see any javascript error

              Repeat above steps for NWIKI page format as well.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              FYI:
              Javascript is trying to find textarea with id=mform1 /mod/wiki/editors/wiki/buttons.js - Line 23, but while creating wiki editor (/mod/wiki/editors/wiki_editor.php - line 77) we assign id = wikiform.

              Well spotted by Jason

              Show
              rajeshtaneja Rajesh Taneja added a comment - FYI: Javascript is trying to find textarea with id=mform1 /mod/wiki/editors/wiki/buttons.js - Line 23, but while creating wiki editor (/mod/wiki/editors/wiki_editor.php - line 77) we assign id = wikiform. Well spotted by Jason
              rajeshtaneja Rajesh Taneja made changes -
              Testing Instructions Note: You need firebug/ developer tool to test this.

              # Log in as Admin and turn editing on
              # Select a course and add a wiki activity
              # Select wiki activity and add a new Creole format page
              # Click on comments tab and then click on add comment
              # Open error console to check for javascript errors
              # Type text and select/highlight text in comment box
              # click on bold icon and you should not see any javascript error

              Repeat above steps for NWIKI page format as well.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              Note: You need firebug/ developer tool to test this.

              # Log in as Admin and turn editing on
              # Select a course and add a wiki activity
              # Select wiki activity and add a new Creole format page
              # Click on comments tab and then click on add comment
              # Open error console to check for javascript errors
              # Type text and select/highlight text in comment box
              # click on bold icon and you should not see any javascript error. Also ** should be suffixed and prefixed to selected text.

              Repeat above steps for NWIKI page format as well.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              rajeshtaneja Rajesh Taneja made changes -
              Testing Instructions Note: You need firebug/ developer tool to test this.

              # Log in as Admin and turn editing on
              # Select a course and add a wiki activity
              # Select wiki activity and add a new Creole format page
              # Click on comments tab and then click on add comment
              # Open error console to check for javascript errors
              # Type text and select/highlight text in comment box
              # click on bold icon and you should not see any javascript error. Also ** should be suffixed and prefixed to selected text.

              Repeat above steps for NWIKI page format as well.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              Note: You need firebug/ developer tool for checking JS errors.

              # Log in as Admin and turn editing on
              # Select a course and add a wiki activity
              # Select wiki activity and add a new Creole format page
              # Click on comments tab and then click on add comment
              # Open error console to check for javascript errors
              # Type text and select/highlight text in comment box
              # click on bold icon and you should not see any javascript error. Also ** should be suffixed and prefixed to selected text.

              Repeat above steps for NWIKI page format as well.

              Note that because of MDL-28101 Bold and Italics fail in a different way for NWIKI.
              ankit_frenz Ankit Agarwal 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 ankit_frenz
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              Looks good to me!
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - Looks good to me! Thanks
              ankit_frenz Ankit Agarwal made changes -
              Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
              rajeshtaneja Rajesh Taneja made changes -
              Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Currently in integration Yes [ 10041 ]
              samhemelryk Sam Hemelryk made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Integrator samhemelryk
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks guys, this has been integrated now.
              I was in two minds about it to begin with as wikiform is a much better id in this case then mform1, however given the impending wiki change I think there is no harm in this.

              Cheers
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks guys, this has been integrated now. I was in two minds about it to begin with as wikiform is a much better id in this case then mform1, however given the impending wiki change I think there is no harm in this. Cheers Sam
              samhemelryk Sam Hemelryk made changes -
              Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
              Fix Version/s 2.0.8 [ 11554 ]
              Fix Version/s 2.1.5 [ 11553 ]
              Fix Version/s 2.2.2 [ 11552 ]
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              I thought the same Sam, but looking at wikieditor (form element) implementation, I changed my mind

              Show
              rajeshtaneja Rajesh Taneja added a comment - I thought the same Sam, but looking at wikieditor (form element) implementation, I changed my mind
              rajeshtaneja Rajesh Taneja made changes -
              Link This issue has a non-specific relationship to MDL-31584 [ MDL-31584 ]
              blepoxp Glenn Ansley made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              Tester blepoxp
              Hide
              blepoxp Glenn Ansley added a comment -

              Looks good. I tested in master, 2.2, 2.1, and 2.0 integration branches. I will note that the NWiki page type still throws an error but this is being handled in another ticket according to the testing instructions.

              Show
              blepoxp Glenn Ansley added a comment - Looks good. I tested in master, 2.2, 2.1, and 2.0 integration branches. I will note that the NWiki page type still throws an error but this is being handled in another ticket according to the testing instructions.
              blepoxp Glenn Ansley made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks!

              Closing as fixed, heading to zzzZZZzzz, niao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks! Closing as fixed, heading to zzzZZZzzz, niao
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Tested [ 10006 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Currently in integration Yes [ 10041 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Integration date 17/Feb/12
              rajeshtaneja Rajesh Taneja made changes -
              Link This issue has been marked as being related by MDL-33143 [ MDL-33143 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Fix Version/s STABLE Sprint 17 [ 11550 ]

                People

                • Votes:
                  12 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Mar/12