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

M.core_formchangechecker.set_form_changed fails with an error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.2
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide
      1. Open any page with filemanager, for example Navigation->My profile->My private files; open Javascript console window
      2. Make changes ONLY to the filemanager area (add or rename file for example)
      3. Make sure there are no errors in Javascript console window; e.g.

        [Uncaught TypeError: Cannot read property 'target' of undefined]

      4. Click any link on the page
      5. Make sure the browser displays confirmation dialogue asking if you are sure you want to leave the page because the form has unsaved changes
      Show
      Open any page with filemanager, for example Navigation->My profile->My private files; open Javascript console window Make changes ONLY to the filemanager area (add or rename file for example) Make sure there are no errors in Javascript console window; e.g. [Uncaught TypeError: Cannot read property 'target' of undefined] Click any link on the page Make sure the browser displays confirmation dialogue asking if you are sure you want to leave the page because the form has unsaved changes
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-34433-master-1

      Description

      Regression from MDL-33874:

      lib/form/filemanager.js calls

      M.core_formchangechecker.set_form_changed()

      without arguments, i.e. e is undefined

      After your changes I get an error:

      Uncaught TypeError: Cannot read property 'target' of undefined
      M.core_formchangechecker.set_form_changed yui_combo.php:96
      Y.extend.filepicker_callback filemanager.js:190
      Y.extend.setup_select_file.getfile.on.request.callback filepicker.js:1181
      Y.extend.request.cfg.on.complete filepicker.js:605
      Y.Subscriber._notify event-custom-base.js:1154
      Y.Subscriber.notify event-custom-base.js:1183
      Y.CustomEvent._notify event-custom-base.js:879
      Y.CustomEvent._procSubs event-custom-base.js:984
      Y.CustomEvent.fire Simpleevent-custom-base.js:953
      Y.CustomEvent.fire event-custom-base.js:934
      ET.fire event-custom-base.js:1962
      IO._evt io-base.js:230
      IO.complete io-base.js:266
      IO._rS io-base.js:512

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              marina Marina Glancy added a comment -

              It is not possible to save the changes in any form containing filemanager element now

              Show
              marina Marina Glancy added a comment - It is not possible to save the changes in any form containing filemanager element now
              Hide
              dobedobedoh Andrew Nicols added a comment -

              Hi Marina,

              So far I've been unable to reproduce - could you provide some instructions so I can be sure that my fix works as expected?

              Cheers,
              Andrew

              Show
              dobedobedoh Andrew Nicols added a comment - Hi Marina, So far I've been unable to reproduce - could you provide some instructions so I can be sure that my fix works as expected? Cheers, Andrew
              Hide
              marina Marina Glancy added a comment -

              Hi Andrew,
              I changed the priority again. Sorry, it's not blocker. The form actually does not freeze. See testing instructions on how to reproduce

              Show
              marina Marina Glancy added a comment - Hi Andrew, I changed the priority again. Sorry, it's not blocker. The form actually does not freeze. See testing instructions on how to reproduce
              Hide
              dmonllao David Monllaó added a comment -

              Hi Andrew,

              The patch works and looks ok

              Show
              dmonllao David Monllaó added a comment - Hi Andrew, The patch works and looks ok
              Hide
              dobedobedoh Andrew Nicols added a comment -

              Should cherry-pick cleanly to:

              • MOODLE_23_STABLE
              • master

              Does not need to be applied to any other branches

              Show
              dobedobedoh Andrew Nicols added a comment - Should cherry-pick cleanly to: MOODLE_23_STABLE master Does not need to be applied to any other branches
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Andrew, has been integrated now.

              A tiny comment - can I request that you address your cherry-pick instructions to integrator, as I almost missed it!

              e.g. TO INTEGRATOR: Please cherry..

              Show
              poltawski Dan Poltawski added a comment - Thanks Andrew, has been integrated now. A tiny comment - can I request that you address your cherry-pick instructions to integrator, as I almost missed it! e.g. TO INTEGRATOR: Please cherry..
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              No errors generated, but as soon as I click on the first file in filepicker. I get the following warning

              Timestamp: 01/08/12 11:22:12
              Warning: Use of attributes' specified attribute is deprecated. It always returns true.
              Source File: http://yui.yahooapis.com/combo?3.5.1/build/oop/oop.js&3.5.1/build/event-custom-base/event-custom-base.js&3.5.1/build/dom-core/dom-core.js&3.5.1/build/dom-base/dom-base.js&3.5.1/build/selector-native/selector-native.js&3.5.1/build/selector/selector.js&3.5.1/build/node-core/node-core.js&3.5.1/build/node-base/node-base.js&3.5.1/build/event-base/event-base.js&3.5.1/build/event-delegate/event-delegate.js&3.5.1/build/node-event-delegate/node-event-delegate.js&3.5.1/build/pluginhost-base/pluginhost-base.js&3.5.1/build/pluginhost-config/pluginhost-config.js&3.5.1/build/node-pluginhost/node-pluginhost.js&3.5.1/build/dom-style/dom-style.js&3.5.1/build/dom-screen/dom-screen.js&3.5.1/build/node-screen/node-screen.js&3.5.1/build/node-style/node-style.js
              Line: 3176

              Doesn't seem related to this issue. So passing.
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - No errors generated, but as soon as I click on the first file in filepicker. I get the following warning Timestamp: 01/08/12 11:22:12 Warning: Use of attributes' specified attribute is deprecated. It always returns true. Source File: http://yui.yahooapis.com/combo?3.5.1/build/oop/oop.js&3.5.1/build/event-custom-base/event-custom-base.js&3.5.1/build/dom-core/dom-core.js&3.5.1/build/dom-base/dom-base.js&3.5.1/build/selector-native/selector-native.js&3.5.1/build/selector/selector.js&3.5.1/build/node-core/node-core.js&3.5.1/build/node-base/node-base.js&3.5.1/build/event-base/event-base.js&3.5.1/build/event-delegate/event-delegate.js&3.5.1/build/node-event-delegate/node-event-delegate.js&3.5.1/build/pluginhost-base/pluginhost-base.js&3.5.1/build/pluginhost-config/pluginhost-config.js&3.5.1/build/node-pluginhost/node-pluginhost.js&3.5.1/build/dom-style/dom-style.js&3.5.1/build/dom-screen/dom-screen.js&3.5.1/build/node-screen/node-screen.js&3.5.1/build/node-style/node-style.js Line: 3176 Doesn't seem related to this issue. So passing. Thanks
              Hide
              poltawski Dan Poltawski added a comment -

              asko, Дзякуй, ধন্যবাদ, Благодаря, Gràcies, 感谢, 謝謝, Hvala, Díky, Tak, Bedankt, Tänan, متشکریم, Salamat, Kiitokset, Merci, Grazas, Danke, Ευχαριστώ, આભાર, תודה, धन्यवाद, Köszönjük, Takk fyrir, Terima Kasih, Grazie, ありがとうございます, Рахмет, សូមអរគុណ, 감사합니다, gratiās, Pateicamies, Ačiū, Благодарам, Tēnā koa, Kia Ora Rawa Atu, आभारी आहोत, Талархал, Takk, Dziękuję, Obrigado, Mulţumesc, Engraziel, Спасибо, Fa'afetai, Хвала, Hvala, ස්තූතියි, Vďaka, Hvala, Mahadsanid, Thanks, Gracias, Tack, Salamat, நன்றி, నెనరులు, ขอบคุณค่ะ!

              Your work has made it into this weeks Moodle release! There are no gold medals available this week - but millions around the world will benefit. Thank you!

              Show
              poltawski Dan Poltawski added a comment - asko, Дзякуй, ধন্যবাদ, Благодаря, Gràcies, 感谢, 謝謝, Hvala, Díky, Tak, Bedankt, Tänan, متشکریم, Salamat, Kiitokset, Merci, Grazas, Danke, Ευχαριστώ, આભાર, תודה, धन्यवाद, Köszönjük, Takk fyrir, Terima Kasih, Grazie, ありがとうございます, Рахмет, សូមអរគុណ, 감사합니다, gratiās, Pateicamies, Ačiū, Благодарам, Tēnā koa, Kia Ora Rawa Atu, आभारी आहोत, Талархал, Takk, Dziękuję, Obrigado, Mulţumesc, Engraziel, Спасибо, Fa'afetai, Хвала, Hvala, ස්තූතියි, Vďaka, Hvala, Mahadsanid, Thanks, Gracias, Tack, Salamat, நன்றி, నెనరులు, ขอบคุณค่ะ! Your work has made it into this weeks Moodle release! There are no gold medals available this week - but millions around the world will benefit. Thank you!

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12