Details

    • Testing Instructions:
      Hide
      1. login as admin
      2. goto xmldb editor (Site administration -> Development -> XMLDB editor)
      3. load and edit any table (Click on load and then edit will appear)
      4. In Tables section click on edit
      5. Click on "New index", and click "change"
      6. Make sure all strings are fine and no php notice/error is encountered.
      7. Try above with some proper field name and ensure proper strings are visible, without php notice/error.
      Show
      login as admin goto xmldb editor (Site administration -> Development -> XMLDB editor) load and edit any table (Click on load and then edit will appear) In Tables section click on edit Click on "New index", and click "change" Make sure all strings are fine and no php notice/error is encountered. Try above with some proper field name and ensure proper strings are visible, without php notice/error.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      wip-mdl-35047
    • Rank:
      43660

      Description

      Replication steps:

      1. login as admin
      2. goto xmldb editor
      3. load and edit any table
      4. try to add a index , use name of any existing field as the name for index.

      Expected result: Shows a error that the name is already being used

      Actual result: Missing string exceptions are thrown

      Invalid get_string() identifier: 'indexnameempty' or component 'tool_xmldb'. Perhaps you are missing $string['indexnameempty'] = ''; in /var/www/stable/master/moodle/admin/tool/xmldb/lang/en/tool_xmldb.php?
      
          line 6640 of /lib/moodlelib.php: call to debugging()
          line 7264 of /lib/moodlelib.php: call to core_string_manager->get_string()
          line 137 of /admin/tool/xmldb/actions/XMLDBAction.class.php: call to get_string()
          line 53 of /admin/tool/xmldb/actions/edit_index_save/edit_index_save.class.php: call to XMLDBAction->loadStrings()
          line 60 of /admin/tool/xmldb/actions/XMLDBAction.class.php: call to edit_index_save->init()
          line 67 of /admin/tool/xmldb/index.php: call to XMLDBAction->__construct()
      
      Invalid get_string() identifier: 'incorrectindexname' or component 'tool_xmldb'. Perhaps you are missing $string['incorrectindexname'] = ''; in /var/www/stable/master/moodle/admin/tool/xmldb/lang/en/tool_xmldb.php?
      
          line 6640 of /lib/moodlelib.php: call to debugging()
          line 7264 of /lib/moodlelib.php: call to core_string_manager->get_string()
          line 137 of /admin/tool/xmldb/actions/XMLDBAction.class.php: call to get_string()
          line 53 of /admin/tool/xmldb/actions/edit_index_save/edit_index_save.class.php: call to XMLDBAction->loadStrings()
          line 60 of /admin/tool/xmldb/actions/XMLDBAction.class.php: call to edit_index_save->init()
          line 67 of /admin/tool/xmldb/index.php: call to XMLDBAction->__construct()
      
      Invalid get_string() identifier: 'duplicateindexname' or component 'tool_xmldb'. Perhaps you are missing $string['duplicateindexname'] = ''; in /var/www/stable/master/moodle/admin/tool/xmldb/lang/en/tool_xmldb.php?
      
          line 6640 of /lib/moodlelib.php: call to debugging()
          line 7264 of /lib/moodlelib.php: call to core_string_manager->get_string()
          line 137 of /admin/tool/xmldb/actions/XMLDBAction.class.php: call to get_string()
          line 53 of /admin/tool/xmldb/actions/edit_index_save/edit_index_save.class.php: call to XMLDBAction->loadStrings()
          line 60 of /admin/tool/xmldb/actions/XMLDBAction.class.php: call to edit_index_save->init()
          line 67 of /admin/tool/xmldb/index.php: call to XMLDBAction->__construct()
      

        Issue Links

          Activity

          Hide
          Ankit Agarwal added a comment -

          Hi RAj,
          This looks good.
          I may be a bit whiny but imho
          +$string['incorrectindexname']
          should be before
          $string['index']
          to keep the strings in alphabetical order (I know it is already incorrect in there).
          Anyways feel free to ignore me and submit for integration.
          Thanks

          Show
          Ankit Agarwal added a comment - Hi RAj, This looks good. I may be a bit whiny but imho +$string ['incorrectindexname'] should be before $string ['index'] to keep the strings in alphabetical order (I know it is already incorrect in there). Anyways feel free to ignore me and submit for integration. Thanks
          Hide
          Rajesh Taneja added a comment -

          Thanks Ankit,

          I tried to keep similar strings together. That file is not respecting any ordering, hence opened another issue (MDL-35733) to take care of it.

          Show
          Rajesh Taneja added a comment - Thanks Ankit, I tried to keep similar strings together. That file is not respecting any ordering, hence opened another issue ( MDL-35733 ) to take care of it.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (22, 23 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (22, 23 & master), thanks!
          Hide
          Frédéric Massart added a comment -

          Thanks. Test passed on 2.2, 2.3 and master.

          Show
          Frédéric Massart added a comment - Thanks. Test passed on 2.2, 2.3 and master.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          From somewhere within the clouds...

          Congrats, this has been sent upstream and is now part of Moodle (your favorite LMS platform). Many thanks for your awesome collaboration!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - From somewhere within the clouds... Congrats, this has been sent upstream and is now part of Moodle (your favorite LMS platform). Many thanks for your awesome collaboration! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: