Moodle
  1. Moodle
  2. MDL-23006

Missing strings on table edit in XMLDB Editor

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      6109

      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()

        Issue Links

          Activity

          Hide
          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
          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
          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
          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
          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
          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
          Eloy Lafuente (stronk7) added a comment -

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

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

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

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

          Integrated, thanks!

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

          Tested, works as expected, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Tested, works as expected, thanks!
          Hide
          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
          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:
              Stephen Bourget
              Reporter:
              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: