Moodle
  1. Moodle
  2. MDL-30460

In wiki editor for Creole and NWiki pages, image dropdown does not include files with upper case suffixes.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.1.3, 2.2
    • Fix Version/s: 2.0.7, 2.1.4
    • Component/s: Wiki (2.x)
    • Labels:
    • Rank:
      33131

      Description

      Found this while testing MDLQA-1395 (A student can add images to a wiki). I uploaded an image file in the wiki Files tab. Then I went to edit a Creole-formatted wiki page, and the image file would not appear in the drop down for inserting an image. After some investigation, I found that the cause was that the file extension of the image file was in upper case. I then tried an image file with a lower-case file extension and that worked.

      This looks very similar to MDL-30165 except that it affects a different area. The problem appears to be in mod/wiki/edit_form.php with this condition in the definition method:

      if (preg_match('#'.$ext.'$#', $filename)) {

      The fix for MDL-30165 fixed a similar issue in repository/lib.php by change the preg_match pattern to '#'.$ext.'$#i' (Note the addition of 'i'.)

        Issue Links

          Activity

          Colin Campbell created issue -
          Colin Campbell made changes -
          Field Original Value New Value
          Labels mdlqa
          Colin Campbell made changes -
          Link This issue discovered while testing MDLQA-1395 [ MDLQA-1395 ]
          Hide
          Michael de Raadt added a comment -

          Thanks for spotting this and providing a solution.

          Show
          Michael de Raadt added a comment - Thanks for spotting this and providing a solution.
          Michael de Raadt made changes -
          Fix Version/s STABLE backlog [ 10463 ]
          Priority Minor [ 4 ] Blocker [ 1 ]
          Labels mdlqa mdlqa patch triaged
          Difficulty Easy [ 10023 ]
          Ankit Agarwal made changes -
          Assignee moodle.com [ moodle.com ] Ankit Agarwal [ ankit_frenz ]
          Hide
          Ankit Agarwal added a comment -

          Simple fix, sending through integration
          Thanks

          Show
          Ankit Agarwal added a comment - Simple fix, sending through integration Thanks
          Ankit Agarwal made changes -
          Status Open [ 1 ] Waiting for integration review [ 10010 ]
          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, this has been integrated and tested for master and stables too.

          Show
          Aparup Banerjee added a comment - Thanks, this has been integrated and tested for master and stables too.
          Aparup Banerjee made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Affects Version/s 2.1.3 [ 11251 ]
          Affects Version/s 2.0.6 [ 11250 ]
          Fix Version/s 2.0.7 [ 11451 ]
          Fix Version/s 2.1.4 [ 11452 ]
          Fix Version/s STABLE backlog [ 10463 ]
          Hide
          Aparup Banerjee added a comment -

          passing - simple and works fine.

          Show
          Aparup Banerjee added a comment - passing - simple and works fine.
          Aparup Banerjee made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Tester nebgor
          Aparup Banerjee made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The master fixes corresponding to this issue have been sent upstream. Fixes for other branches (19, 20, 21 stable) will be sent in the very-next days.

          Thanks for the hard work! Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The master fixes corresponding to this issue have been sent upstream. Fixes for other branches (19, 20, 21 stable) will be sent in the very-next days. Thanks for the hard work! Closing, ciao
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes [ 10041 ]
          Integration date 29/Nov/11
          Eloy Lafuente (stronk7) made changes -
          Labels mdlqa patch triaged patch triaged

            People

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

              Dates

              • Created:
                Updated:
                Resolved: