Moodle
  1. Moodle
  2. MDL-32037

Accidentally picking the wrong repository will disable it from working.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Filepicker
    • Labels:
    • Testing Instructions:
      Hide

      Repeat instructions 'to reproduce' from description, make sure you can select image.
      Please note that this was a tricky error and in order to reproduce it you have to do exactly what is written - not more and not less.

      Show
      Repeat instructions 'to reproduce' from description, make sure you can select image. Please note that this was a tricky error and in order to reproduce it you have to do exactly what is written - not more and not less.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-32037-master

      Description

      To reproduce:

      • Go to [Site administration->Plugins->Repositories->Manage repositories] and make Youtube videos and Wikimedia 'Enabled and visible'.
      • Create an activity which uses a text editor. (I chose a lesson, but it could be a reply in a forum)
      • Click the moodle media button on the text editor and click 'Find or upload a sound, video or applet...'
      • Select Wikimedia and then do a search for something.
      • Find an image and try to upload it.
      • It should come up with an error as this isn't the right place to be uploading images.
      • Realise your mistake and click on the 'insert/edit image' button and then click 'Find or upload an image...'
      • Wikimedia should already be selected. Do a search for something and either hit enter or click select.
      • The file picker should think about it very quickly and then display nothing.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Marina Glancy added a comment -

            MDL-32037: After displaying error message filepicker could not send proper request to server

            We need to make sure that code executed on error does not create more requests and
            especially does not create the same request that resulted with error. So now by default
            filepicker will clear the right side of the window if repository_ajax.php returned an
            error.
            Also fixed an 'invalidsesskey' error string.

            Dongsheng, can you please review this. Please don't submit for integration before I cherry-pick for previous versions

            Show
            Marina Glancy added a comment - MDL-32037 : After displaying error message filepicker could not send proper request to server We need to make sure that code executed on error does not create more requests and especially does not create the same request that resulted with error. So now by default filepicker will clear the right side of the window if repository_ajax.php returned an error. Also fixed an 'invalidsesskey' error string. Dongsheng, can you please review this. Please don't submit for integration before I cherry-pick for previous versions
            Hide
            Dongsheng Cai added a comment -

            Looks good, thanks!

            Show
            Dongsheng Cai added a comment - Looks good, thanks!
            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
            Hide
            Sam Hemelryk added a comment -

            Hi Marina, this has been integrated now.
            Please could you add test instructions ASAP

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi Marina, this has been integrated now. Please could you add test instructions ASAP Cheers Sam
            Hide
            Jason Fowler added a comment -

            I get this error if I select a PNG from wikimedia

            Invalid get_string() identifier: 'image/png' or component 'mimetypes'line 5962 of /lib/moodlelib.php: call to debugging()line 6552 of /lib/moodlelib.php: call to core_string_manager->get_string()line 177 of /repository/repository_ajax.php: call to get_string()

            {"error":"[[image\/png]] filetype cannot be accepted.","stacktrace":"* line 177 of \/repository\/repository_ajax.php: moodle_exception thrown\n","debuginfo":null,"reproductionlink":"http:\/\/localhost\/istable21\/"}
            Show
            Jason Fowler added a comment - I get this error if I select a PNG from wikimedia Invalid get_string() identifier: 'image/png' or component 'mimetypes'line 5962 of /lib/moodlelib.php: call to debugging()line 6552 of /lib/moodlelib.php: call to core_string_manager->get_string()line 177 of /repository/repository_ajax.php: call to get_string() {"error":"[[image\/png]] filetype cannot be accepted.","stacktrace":"* line 177 of \/repository\/repository_ajax.php: moodle_exception thrown\n","debuginfo":null,"reproductionlink":"http:\/\/localhost\/istable21\/"}
            Hide
            Dan Poltawski added a comment -

            The missing string is a problem that existed before this issue and is separate (as can be confirmed by trying to pick a png from one of the other repositories) in that repo selector.

            I will create a bug for the missing string.

            Show
            Dan Poltawski added a comment - The missing string is a problem that existed before this issue and is separate (as can be confirmed by trying to pick a png from one of the other repositories) in that repo selector. I will create a bug for the missing string.
            Hide
            Dan Poltawski added a comment -

            Tested with jpeg and worked fine, passing

            Show
            Dan Poltawski added a comment - Tested with jpeg and worked fine, passing
            Hide
            Dan Poltawski added a comment -

            MDL-32134 created about missing lang string

            Show
            Dan Poltawski added a comment - MDL-32134 created about missing lang string
            Hide
            Sam Hemelryk added a comment -

            Congratulations are in order, you've made it, or at least your code has!
            It's now part of Moodle and both the git and cvs repositories have been updated.

            This issue is being marked as fixed and closed.

            Thank you.

            Show
            Sam Hemelryk added a comment - Congratulations are in order, you've made it, or at least your code has! It's now part of Moodle and both the git and cvs repositories have been updated. This issue is being marked as fixed and closed. Thank you.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: