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

Saving a wiki page produce errors

    XMLWordPrintable

    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]

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rwijaya Rossiani Wijaya
              Reporter:
              rwijaya Rossiani Wijaya
              Peer reviewer:
              Andrew Davis
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

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