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

calendar export does not set PAGE context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Peer review in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.1
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide

      Run calendar export with debug logging turned on. Without patch, you will see the like of "PHP Notice:  Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context()." in web server logs. With patch, these should be gone.

       

      Stack trace here is:

      PHP Stack trace:
      PHP 1. {main}() /srv/moodle/otagounifom/moodle/calendar/export_execute.php:0
      PHP 2. format_text() /srv/moodle/otagounifom/moodle/calendar/export_execute.php:225
      PHP 3. filter_manager->filter_text() /srv/moodle/otagounifom/moodle/lib/weblib.php:1275
      PHP 4. filter_manager->apply_filter_chain() /srv/moodle/otagounifom/moodle/lib/filterlib.php:218
      PHP 5. filter_emoticon->filter() /srv/moodle/otagounifom/moodle/lib/filterlib.php:176
      PHP 6. filter_emoticon->replace_emoticons() /srv/moodle/otagounifom/moodle/filter/emoticon/filter.php:52
      PHP 7. moodle_page->__get() /srv/moodle/otagounifom/moodle/filter/emoticon/filter.php:73
      PHP 8. moodle_page->magic_get_theme() /srv/moodle/otagounifom/moodle/lib/pagelib.php:820
      PHP 9. moodle_page->initialise_theme_and_output() /srv/moodle/otagounifom/moodle/lib/pagelib.php:677
      PHP 10. moodle_page->magic_get_context() /srv/moodle/otagounifom/moodle/lib/pagelib.php:1544
      PHP 11. debugging() /srv/moodle/otagounifom/moodle/lib/pagelib.php:493
      PHP 12. trigger_error() /srv/moodle/otagounifom/moodle/lib/weblib.php:3144

      Show
      Run calendar export with debug logging turned on. Without patch, you will see the like of "PHP Notice:  Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context()." in web server logs. With patch, these should be gone.   Stack trace here is: PHP Stack trace: PHP 1. {main}() /srv/moodle/otagounifom/moodle/calendar/export_execute.php:0 PHP 2. format_text() /srv/moodle/otagounifom/moodle/calendar/export_execute.php:225 PHP 3. filter_manager->filter_text() /srv/moodle/otagounifom/moodle/lib/weblib.php:1275 PHP 4. filter_manager->apply_filter_chain() /srv/moodle/otagounifom/moodle/lib/filterlib.php:218 PHP 5. filter_emoticon->filter() /srv/moodle/otagounifom/moodle/lib/filterlib.php:176 PHP 6. filter_emoticon->replace_emoticons() /srv/moodle/otagounifom/moodle/filter/emoticon/filter.php:52 PHP 7. moodle_page->__get() /srv/moodle/otagounifom/moodle/filter/emoticon/filter.php:73 PHP 8. moodle_page->magic_get_theme() /srv/moodle/otagounifom/moodle/lib/pagelib.php:820 PHP 9. moodle_page->initialise_theme_and_output() /srv/moodle/otagounifom/moodle/lib/pagelib.php:677 PHP 10. moodle_page->magic_get_context() /srv/moodle/otagounifom/moodle/lib/pagelib.php:1544 PHP 11. debugging() /srv/moodle/otagounifom/moodle/lib/pagelib.php:493 PHP 12. trigger_error() /srv/moodle/otagounifom/moodle/lib/weblib.php:3144
    • Affected Branches:
      MOODLE_34_STABLE
    • Pull from Repository:

      Description

      We're getting warnings - "PHP Notice: Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context()" etc. on every call to calendar/export_execute.php

      That script should call $PAGE->set_context. Question is, what context should it set - system? user?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nwpotago Nick Phillips
                Reporter:
                nwpotago Nick Phillips
                Peer reviewer:
                Marina Glancy
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                4 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated: