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

Comments block causes JS error for unauthenticated user

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.2.3
    • Fix Version/s: None
    • Component/s: Comments
    • Labels:
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      When an unauthenticated user visits a page (like the site Home) that contains a Comments block, a JavaScript error is thrown.

      IE reports the error as...

      Webpage error details
       
      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
      Timestamp: Wed, 23 May 2012 01:22:44 UTC
       
       
      Message: 'null' is null or not an object
      Line: 26
      Char: 223
      Code: 0
      URI: http://qa.moodle.net/lib/javascript.php/1130/comment/comment.js

      Firefox reports "t is null" on line 26.

      Replication steps:

      1. Log in as admin
      2. Navigate to the site Home page
      3. Turn editing on
      4. Add a Comments block
      5. Add a comment in the Comments block
      6. Log out
      7. Check the error console on your browser (you may need to refresh after enabling the error console)

      Expected result: no JS errors shown

      Actual result: JS error shown

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dongsheng Dongsheng Cai
              Reporter:
              salvetore Michael de Raadt
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: