Moodle
  1. Moodle
  2. MDL-7248

Omitted wiki HTML editor when editing a page the second time

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7, 1.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian Etch, PHP 5.1.x, Mysql 5.0.x
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE
    • Rank:
      27868

      Description

      Step to reproduce the bug:

      1.Create a wiki in acourse
      2. edit a page using the HTML editor
      3. go elsewhere in the course
      4. re-access a page the wiki creadet at point 1 and click the "edit" tab.
      5. the HTML editor does not load

      Viewing the source, the HTML page is truncated

      When in Admin ytou turn debug on (max level), using the steps above displays teh following result:

      Fatal error: Call to undefined function print_require_js() in /home/.../moodle/mod/wiki/view.php on line 447

        Activity

        Hide
        Andrea Bicciolo added a comment -

        Forgot to mention the problem appears either in IE and FF running on WinXP box.

        Show
        Andrea Bicciolo added a comment - Forgot to mention the problem appears either in IE and FF running on WinXP box.
        Hide
        Dan Poltawski added a comment -

        Looks like the print_require_js function has changed name and this is the only remainign reference:

        @@ -444,7 +444,7 @@
        }
        } else {
        // OK, the page is now locked to us. Put in the AJAX for keeping the lock

        • print_require_js(array('yui_yahoo','yui_connection'));
          + require_js(array('yui_yahoo','yui_connection'));
          $strlockcancelled=get_string('lockcancelled','wiki');
          $strnojslockwarning=get_string('nojslockwarning','wiki');
          $intervalms=WIKI_LOCK_RECONFIRM*1000;
        Show
        Dan Poltawski added a comment - Looks like the print_require_js function has changed name and this is the only remainign reference: @@ -444,7 +444,7 @@ } } else { // OK, the page is now locked to us. Put in the AJAX for keeping the lock print_require_js(array('yui_yahoo','yui_connection')); + require_js(array('yui_yahoo','yui_connection')); $strlockcancelled=get_string('lockcancelled','wiki'); $strnojslockwarning=get_string('nojslockwarning','wiki'); $intervalms=WIKI_LOCK_RECONFIRM*1000;
        Hide
        Dan Poltawski added a comment -

        Also, would it not be better to use the proper libdir variable?:

        @@ -7,7 +7,7 @@
        require_once("../../config.php");
        require_once("lib.php");
        #require_once("$CFG->dirroot/course/lib.php"); // For side-blocks

        • require_once(dirname(_FILE_).'/../../lib/ajax/ajaxlib.php');
          + require_once($CFG->libdir . '/ajax/ajaxlib.php');

        $ewiki_action = optional_param('ewiki_action', '', PARAM_ALPHA); // Action on Wiki-Page
        $id = optional_param('id', 0, PARAM_INT); // Course Module ID, or

        Show
        Dan Poltawski added a comment - Also, would it not be better to use the proper libdir variable?: @@ -7,7 +7,7 @@ require_once("../../config.php"); require_once("lib.php"); #require_once("$CFG->dirroot/course/lib.php"); // For side-blocks require_once(dirname(_ FILE _).'/../../lib/ajax/ajaxlib.php'); + require_once($CFG->libdir . '/ajax/ajaxlib.php'); $ewiki_action = optional_param('ewiki_action', '', PARAM_ALPHA); // Action on Wiki-Page $id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
        Hide
        Martin Dougiamas added a comment -

        Thanks, guys!

        Show
        Martin Dougiamas added a comment - Thanks, guys!
        Hide
        Stephen Bourget added a comment -

        Verified fix on Moodle 1.7beta 2

        Closing

        Show
        Stephen Bourget added a comment - Verified fix on Moodle 1.7beta 2 Closing

          People

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

            Dates

            • Created:
              Updated:
              Resolved: