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

Forum Cron error

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.5
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      After migrating to a new server I get an error in the Forum cron job (see below). What's causing it?

      Execute scheduled task: Forum mailings and maintenance jobs (mod_forum\task\cron_task)
      ... started 20:21:50. Current memory use 22.2MB.
      Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result
      line 493 of /lib/pagelib.php: call to debugging()
      line 1544 of /lib/pagelib.php: call to moodle_page->magic_get_context()
      line 677 of /lib/pagelib.php: call to moodle_page->initialise_theme_and_output()
      line 864 of /lib/pagelib.php: call to moodle_page->magic_get_theme()
      line 466 of /mod/forum/lib.php: call to moodle_page->get_renderer()
      line 45 of /mod/forum/classes/task/cron_task.php: call to forum_cron()
      line 105 of /lib/cronlib.php: call to mod_forum\task\cron_task->execute()
      line 297 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
      line 91 of /admin/tool/task/schedule_task.php: call to cron_run_single_task()
      ... used 5 dbqueries
      ... used 0.028049945831299 seconds
      Scheduled task failed: Forum mailings and maintenance jobs (mod_forum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dobedobedoh Andrew Nicols
                Reporter:
                bertvanderhooft Bert van der Hooft
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: