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

Missing strings on table edit in XMLDB Editor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.1, 2.2
    • Fix Version/s: 2.1.3
    • Labels:
    • Environment:
      PHP 5.2.11
      MySQL 5.1.37
      MAMP
    • Database:
      Any
    • Testing Instructions:
      Hide

      1. Set debugging to developer and display errors to yes at Site Administration -> Development ->Debugging
      2. From the navigation block navigate to XMLDB editor at Site Administration -> Development ->XMLDB editor
      3. Locate mod/chat/db and click the [Load] link
      4. Locate mod/chat/db and click the [Edit] link
      5. Locate the chat_messages entry under "tables" and click the [Edit] link
      6. Change the name from chat_messages to chat_messages2 and click the change link.

      Verify that the notices shown in the bug description are not displayed

      Show
      1. Set debugging to developer and display errors to yes at Site Administration -> Development ->Debugging 2. From the navigation block navigate to XMLDB editor at Site Administration -> Development ->XMLDB editor 3. Locate mod/chat/db and click the [Load] link 4. Locate mod/chat/db and click the [Edit] link 5. Locate the chat_messages entry under "tables" and click the [Edit] link 6. Change the name from chat_messages to chat_messages2 and click the change link. Verify that the notices shown in the bug description are not displayed
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      mdl-23006-xmldb-missing-strings

      Description

      The following notices appear when you try to rename a table using the XMLDB editor

      Invalid get_string() identifier: 'tablenameempty' or component 'xmldb'

      • line 5982 of /lib/moodlelib.php: call to debugging()
      • line 6536 of /lib/moodlelib.php: call to core_string_manager->get_string()
      • line 138 of /admin/xmldb/actions/XMLDBAction.class.php: call to get_string()
      • line 48 of /admin/xmldb/actions/edit_table_save/edit_table_save.class.php: call to XMLDBAction->loadStrings()
      • line 60 of /admin/xmldb/actions/XMLDBAction.class.php: call to edit_table_save->init()
      • line 67 of /admin/xmldb/actions/XMLDBAction.class.php: call to XMLDBAction->XMLDBAction()
      • line 70 of /admin/xmldb/index.php: call to XMLDBAction->__construct()

      Invalid get_string() identifier: 'incorrecttablename' or component 'xmldb'

      • line 5982 of /lib/moodlelib.php: call to debugging()
      • line 6536 of /lib/moodlelib.php: call to core_string_manager->get_string()
      • line 138 of /admin/xmldb/actions/XMLDBAction.class.php: call to get_string()
      • line 48 of /admin/xmldb/actions/edit_table_save/edit_table_save.class.php: call to XMLDBAction->loadStrings()
      • line 60 of /admin/xmldb/actions/XMLDBAction.class.php: call to edit_table_save->init()
      • line 67 of /admin/xmldb/actions/XMLDBAction.class.php: call to XMLDBAction->XMLDBAction()
      • line 70 of /admin/xmldb/index.php: call to XMLDBAction->__construct()

      Invalid get_string() identifier: 'duplicatetablename' or component 'xmldb'

      • line 5982 of /lib/moodlelib.php: call to debugging()
      • line 6536 of /lib/moodlelib.php: call to core_string_manager->get_string()
      • line 138 of /admin/xmldb/actions/XMLDBAction.class.php: call to get_string()
      • line 48 of /admin/xmldb/actions/edit_table_save/edit_table_save.class.php: call to XMLDBAction->loadStrings()
      • line 60 of /admin/xmldb/actions/XMLDBAction.class.php: call to edit_table_save->init()
      • line 67 of /admin/xmldb/actions/XMLDBAction.class.php: call to XMLDBAction->XMLDBAction()
      • line 70 of /admin/xmldb/index.php: call to XMLDBAction->__construct()

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            sbourget Stephen Bourget added a comment -

            Eloy,

            It looks like you wrote most of the code for the XMLDB editor. Can you peer review this code?

            Thanks

            Show
            sbourget Stephen Bourget added a comment - Eloy, It looks like you wrote most of the code for the XMLDB editor. Can you peer review this code? Thanks
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Hi Stephen,

            thanks for fixing this, I have the task of adding of all those missing strings here since years ago and never get some time to do so, grrr.

            The fix looks correct although it only covers the "edit table" action. I think we are plenty of missing strings in other "edit" pages like fields, keys, indexes...

            So +1 to send this to integration with the subject changed to "Missing strings on table edition in XMLDB editor" + create followup for the rest.

            Or alternatively, use this to fix all the missing strings and then send to integration the whole thing.

            As you prefer, Stephen!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Hi Stephen, thanks for fixing this, I have the task of adding of all those missing strings here since years ago and never get some time to do so, grrr. The fix looks correct although it only covers the "edit table" action. I think we are plenty of missing strings in other "edit" pages like fields, keys, indexes... So +1 to send this to integration with the subject changed to "Missing strings on table edition in XMLDB editor" + create followup for the rest. Or alternatively, use this to fix all the missing strings and then send to integration the whole thing. As you prefer, Stephen!
            Hide
            sbourget Stephen Bourget added a comment - - edited

            Hi Eloy,

            I've gone through all uses of $this->loadStrings() in moodle/admin/xmldb on MOODLE_21_STABLE and these were the only three missing strings. =)

            I don't have the ability to send this for integration. Can you send this to integration?

            Show
            sbourget Stephen Bourget added a comment - - edited Hi Eloy, I've gone through all uses of $this->loadStrings() in moodle/admin/xmldb on MOODLE_21_STABLE and these were the only three missing strings. =) I don't have the ability to send this for integration. Can you send this to integration?
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Sorry for the delay, Stephen, I had this completely lost! Sending to integration now.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Sorry for the delay, Stephen, I had this completely lost! Sending to integration now.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Just for cross-reference: MDL-30367 about other strings missing.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Just for cross-reference: MDL-30367 about other strings missing.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Tested, works as expected, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Tested, works as expected, thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Closing as fixed, many thanks for your effort!

            Note that the changes related to master (2.2beta) have been already sent upstream. But the stable ones will be part of next weeklies (Wed/Thu) as usual.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for your effort! Note that the changes related to master (2.2beta) have been already sent upstream. But the stable ones will be part of next weeklies (Wed/Thu) as usual. Ciao

              People

              • Assignee:
                sbourget Stephen Bourget
                Reporter:
                sbourget Stephen Bourget
                Peer reviewer:
                Eloy Lafuente (stronk7)
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11