Moodle
  1. Moodle
  2. MDL-25588

Language customization: Check in strings to disk fails with an error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Language
    • Environment:
      Linux 2.6.27.11, Apache 2.2.9, MySQL 5.0.67, PHP 5.2.8
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      6573

      Description

      I modified two strings in the CAS authentication plugin using the Language Customization tool. When I attempted to check the changes into disk, I received the following error:

      Coding error detected, it must be fixed by a programmer: Incorrect file location /var/moodledata-2.0/lang/en_local

      More information about this error
      Stack trace:

      line 261 of /admin/report/customlang/locallib.php: coding_exception thrown
      line 211 of /admin/report/customlang/locallib.php: call to report_customlang_utils::dump_strings()
      line 78 of /admin/report/customlang/index.php: call to report_customlang_utils::checkin()

      /var/moodledata-2.0/lang did not exist, so I created it (and the subdirectory en_local) with mode 755 and Apache as the owner. I got the same error, but I notice that the en_local directory was removed by the check in procedure.

        Activity

        Hide
        David Mudrak added a comment -

        Hi Chris. Thanks for spotting this. In your case, the problem was triggered by the dot character in the moodledata-2.0 directory name. There was an over-restrictive check for the safe path to the local language pack that considered this as an error. I just committed a patch that fixes this.

        Show
        David Mudrak added a comment - Hi Chris. Thanks for spotting this. In your case, the problem was triggered by the dot character in the moodledata-2.0 directory name. There was an over-restrictive check for the safe path to the local language pack that considered this as an error. I just committed a patch that fixes this.
        Hide
        Chris Fryer added a comment -

        Excellent. Thanks. Works for me now.

        Show
        Chris Fryer added a comment - Excellent. Thanks. Works for me now.
        Hide
        David Mudrak added a comment -

        Thanks Chris for re-testing. Closing now.

        Show
        David Mudrak added a comment - Thanks Chris for re-testing. Closing now.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: