Moodle
  1. Moodle
  2. MDL-6544

Under certain conditions nothing appears when a course is in editing mode

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7
    • Component/s: Course, Language
    • Labels:
      None
    • Environment:
      Firefox
      Internet explorer
      Safari
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE

      Description

      In a course, when all this conditions are met :

      • french language
      • topics format course
      • Editing mode

      nothing appears beetween the header and the footer.

      It is connected to the css. : when I disable css, all things appear.

      I try with the standard theme.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Etienne Rozé added a comment -

            Sorry, I did not put the moodle version and I can't change now : it is with the last Moodle 1.7 dev (2006091212)

            good new Moodle tracker, but new...

            Show
            Etienne Rozé added a comment - Sorry, I did not put the moodle version and I can't change now : it is with the last Moodle 1.7 dev (2006091212) good new Moodle tracker, but new...
            Hide
            Etienne Rozé added a comment -

            I try with othet language : I got the same problem

            Show
            Etienne Rozé added a comment - I try with othet language : I got the same problem
            Hide
            Nicolas Martignoni added a comment -

            Confirming this bug with 1.7dev (fresh from CVS).

            For the bug to appear, you have to meet also the following condition : in the profile, the setting "AJAX and Javascript" must be set to "Yes: use advanced web features".

            So this bug has definitely something to do with new AJAX editing mode and languages other than english.

            Show
            Nicolas Martignoni added a comment - Confirming this bug with 1.7dev (fresh from CVS). For the bug to appear, you have to meet also the following condition : in the profile, the setting "AJAX and Javascript" must be set to "Yes: use advanced web features". So this bug has definitely something to do with new AJAX editing mode and languages other than english.
            Hide
            Nicolas Martignoni added a comment -

            The bug appears also on Firefox, Camino and Safari on Mac OS X.

            In Firefox JavaScript console, got the following error :

            Erreur : uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLElement.appendChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://moodletest.fri-tic.ch/lib/ajax/section-resource_classes.js :: anonymous :: line 506" data: no]

            In fact, the HTML code for the whole course page is here, but doesn't displays.

            Show
            Nicolas Martignoni added a comment - The bug appears also on Firefox, Camino and Safari on Mac OS X. In Firefox JavaScript console, got the following error : Erreur : uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLElement.appendChild] " nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://moodletest.fri-tic.ch/lib/ajax/section-resource_classes.js :: anonymous :: line 506" data: no] In fact, the HTML code for the whole course page is here, but doesn't displays.
            Hide
            Nicolas Martignoni added a comment -

            I found the problem. The culprit is the string $string['update'] in lang/<language>/moodle.php. If this string was adapted for a language, say french, then the problem occurs. If this same string is not adapted (i.e. is not present in the language file), then the problem doesn't occur.

            Furthermore, if I change the same string from the french $string['update'] = 'Modifier'; to the original english $string['update'] = 'Update'; in my language pack, the problem disappears again.

            I suspect this string is used somewhere in the AJAX javascript, instead of being hardcoded.

            Show
            Nicolas Martignoni added a comment - I found the problem. The culprit is the string $string ['update'] in lang/<language>/moodle.php. If this string was adapted for a language, say french, then the problem occurs. If this same string is not adapted (i.e. is not present in the language file), then the problem doesn't occur. Furthermore, if I change the same string from the french $string ['update'] = 'Modifier'; to the original english $string ['update'] = 'Update'; in my language pack, the problem disappears again. I suspect this string is used somewhere in the AJAX javascript, instead of being hardcoded.
            Hide
            Etienne Rozé added a comment -

            With Nicolas's informations I found the exact problem situation:

            It's in the file : lib/ajax/section-resource_classes.js
            at the line 486 : if(buttons[x].title == 'Update')

            If I replace 'Update' by 'Modifier' and use french language in a course, all works fine !

            But I don't know resolve that !

            Show
            Etienne Rozé added a comment - With Nicolas's informations I found the exact problem situation: It's in the file : lib/ajax/section-resource_classes.js at the line 486 : if(buttons [x] .title == 'Update') If I replace 'Update' by 'Modifier' and use french language in a course, all works fine ! But I don't know resolve that !
            Hide
            Nicolas Martignoni added a comment -

            Raising priority, as this impairs correct development and testing with other languages.

            Show
            Nicolas Martignoni added a comment - Raising priority, as this impairs correct development and testing with other languages.
            Hide
            Martin Dougiamas added a comment -

            Ed, have you hardcoded some English checking in the AJAX?

            Show
            Martin Dougiamas added a comment - Ed, have you hardcoded some English checking in the AJAX?
            Hide
            Martin Dougiamas added a comment -

            Ah, just saw Etienne's comment ... OK, will get this fixed.

            Show
            Martin Dougiamas added a comment - Ah, just saw Etienne's comment ... OK, will get this fixed.
            Hide
            Martin Dougiamas added a comment -

            I've checked in some changes to CVS, the files are now PHP files and use print_string to set that text.

            It still hasn't fixed the problem for me... but I expect that these being php files will help the next person to have a try.

            Show
            Martin Dougiamas added a comment - I've checked in some changes to CVS, the files are now PHP files and use print_string to set that text. It still hasn't fixed the problem for me... but I expect that these being php files will help the next person to have a try.
            Hide
            Edward Coyne added a comment -

            When my cvs finishes updating I should be able to address this issue fairly quickly. by passing the contents of $string['update'] into the javascript and testing for this instead.

            Show
            Edward Coyne added a comment - When my cvs finishes updating I should be able to address this issue fairly quickly. by passing the contents of $string ['update'] into the javascript and testing for this instead.
            Hide
            Edward Coyne added a comment -

            Fixed issue, there is now a main.portal.strings to pass strings from php to javascript to avoid language issues.(although I beleive this is the only place lanaguage specific strings are used)

            Show
            Edward Coyne added a comment - Fixed issue, there is now a main.portal.strings to pass strings from php to javascript to avoid language issues.(although I beleive this is the only place lanaguage specific strings are used)
            Hide
            Nicolas Martignoni added a comment -

            This is strange, as it seems to have fixed it for me!?

            Show
            Nicolas Martignoni added a comment - This is strange, as it seems to have fixed it for me!?
            Hide
            Nicolas Martignoni added a comment -

            Sorry, my previous comment was about the commit of Martin. Verified too with the fix of Ed, so closing. The french community thanks you

            Show
            Nicolas Martignoni added a comment - Sorry, my previous comment was about the commit of Martin. Verified too with the fix of Ed, so closing. The french community thanks you

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: