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

Object expected javascript error when resource set to open in a new window.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.6.1
    • Fix Version/s: None
    • Component/s: Resource
    • Labels:
      None
    • Environment:
      Windows XP and IE 6
    • Database:
      Any
    • Affected Branches:
      MOODLE_16_STABLE

      Description

      When submitting changes to a resource that has been set to open in a new window a javascript 'object expected' error occurs in the 'preview' screen after changes are submitted. The error references 'line 105' (which is a rendered line number and may differ).. the line is the 'openpopup' call.

      I've tracked this down to a 'defer=defer' attribute in lib/javascript.php.... The following change seems to fix the issue.
      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      diff javascript.php.bkup javascript.php
      26c26
      < <script language="JavaScript" type="text/javascript" defer="defer">

      > <script language="JavaScript" type="text/javascript">
      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      It might also work to defer the openpopup call – but I have not tried that.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                nstreeter Neil Streeter
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: