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

Saving a wiki page produce errors

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1
    • Fix Version/s: 2.0.4
    • Component/s: Wiki (2.x)
    • Labels:
    • Testing Instructions:
      Hide

      To reproduce:
      1. set debug messages to Developer
      2. create new wiki (either creole or nwiki)
      3. upload img file
      4. add uploaded image on edit page and save.

      Make sure there's no error occurs when saving the page.

      Show
      To reproduce: 1. set debug messages to Developer 2. create new wiki (either creole or nwiki) 3. upload img file 4. add uploaded image on edit page and save. Make sure there's no error occurs when saving the page.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Found the following errors while testing to add images to wiki in Nwiki or creole format (MDL-26392)

      Notice: Undefined variable: newcontent in /m20/moodle/mod/wiki/edit.php on line 88
      Notice: Undefined variable: context in /m20/moodle/mod/wiki/pagelib.php on line 1916
      Notice: Trying to get property of non-object in /m20/moodle/mod/wiki/pagelib.php on line 1916

      To reproduce:
      1. create new wiki (either creole or nwiki)
      2. upload img file
      3. add uploaded image on edit page and save.

      Also noticed in mod/wiki/edit.php on line 48, there is a variable called $newconent. I think this is suppose to be $newcontent.

      [code]
      $newconent = '';
      if (!empty($newcontent) && is_array($newcontent))

      { $newcontent = $newcontent['text']; }

      [/code]

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              andyjdavis Andrew Davis added a comment -

              Looks good

              Show
              andyjdavis Andrew Davis added a comment - Looks good
              Hide
              rwijaya Rossiani Wijaya added a comment -

              Andrew,

              Thanks for the review.

              Submitting this to integration.

              Show
              rwijaya Rossiani Wijaya added a comment - Andrew, Thanks for the review. Submitting this to integration.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, thanks, Rossiani!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks, Rossiani!
              Hide
              salvetore Michael de Raadt added a comment -

              Passed: Tested adding images to pages with both Creole and Nwiki wiki pages.

              Show
              salvetore Michael de Raadt added a comment - Passed: Tested adding images to pages with both Creole and Nwiki wiki pages.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              And now this is part of the best Moodle weeklies ever, thanks!

              Closing.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - And now this is part of the best Moodle weeklies ever, thanks! Closing.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Aug/11