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

Incoming file email failing with php coding error

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      With the patch NOT applied
      1. Setup messageinbound with a GMAIL address
      2. Enable messageinbound and the inbound files handler
      3. Run:

        php admin/tool/task/cli/schedule_task.php --execute="\tool_messageinbound\task\pickup_task"
        

        • Confirm lack of errors or failures
      4. View your private files section, and copy the e-mail to private files address
      5. Send a new message with an attachment to the address
      6. Run the pickup task again
        • Confirm that it dies horribly with no real reason
      Apply the patch
      1. Send a new message with an attachment to the address
      2. Run the pickup task again
        • Confirm that the message is now sent

      For additional regression testing, I would advise testing that replying to forum posts by e-mail is also working.

      1. Enable forum handler
      2. Setup a new forum and ensure that your user is enroled in the course, and subscribed to the forum
      3. Create a new discussion, and ensure that it is mailed out
      4. Check your mailbox and reply to the message (make sure that the message inbound address is used properly - gmail sucks at this)
      5. Run the fetch script
        • Confirm lack of errors
        • Confirm that the post was indeed made
      Show
      With the patch NOT applied Setup messageinbound with a GMAIL address Enable messageinbound and the inbound files handler Run: php admin/tool/task/cli/schedule_task.php --execute="\tool_messageinbound\task\pickup_task" Confirm lack of errors or failures View your private files section, and copy the e-mail to private files address Send a new message with an attachment to the address Run the pickup task again Confirm that it dies horribly with no real reason Apply the patch Send a new message with an attachment to the address Run the pickup task again Confirm that the message is now sent For additional regression testing, I would advise testing that replying to forum posts by e-mail is also working. Enable forum handler Setup a new forum and ensure that your user is enroled in the course, and subscribed to the forum Create a new discussion, and ensure that it is mailed out Check your mailbox and reply to the message (make sure that the message inbound address is used properly - gmail sucks at this) Run the fetch script Confirm lack of errors Confirm that the post was indeed made
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-48593-master
    • Sprint:
      FRONTEND Sprint 16

      Description

      Incoming file handeling is failing with the following error messages. This is critical.

      PHP Fatal error:  Call to a member function getHeaderText() on a non-object in /home/pcilms/moodle27/admin/tool/messageinbound/classes/manager.php on line 476
      PHP Warning:  var_export does not handle circular references in /home/pcilms/moodle27/lib/classes/shutdown_manager.php on line 83
      Exception ignored in shutdown function array (
        0 => 
        core\lock\postgres_lock_factory::__set_state(array(
           'dblockid' => 220849118,
           'db' => 
          pgsql_native_moodle_database::__set_state(array(
             'pgsql' => NULL,
             'bytea_oid' => '17',
             'last_error_reporting' => 15,
             'savepointpresent' => false,
             'database_manager' => NULL,
             'temptables' => 
            pgsql_native_moodle_temptables::__set_state(array(
               'mdb' => NULL,
               'prefix' => 'pcilms_',
               'temptables' => 
              array (
              ),
            )),
             'tables' => NULL,
             'dbhost' => '2XXXXXXXXX',
             'dbuser' => 'moodleuser',
             'dbpass' => 'XXXXXXXXX',
             'dbname' => 'XXXXXX',
             'prefix' => 'XXXXX_',
             'dboptions' => 
            array (
              'dbpersist' => 0,
              'dbsocket' => '',
            ),
             'external' => false,
             'reads' => 28,
             'writes' => 0,
             'queriestime' => 0.024179935455322266,
             'debug' => 0,
             'last_sql' => NULL,
             'last_params' => NULL,
             'last_type' => 1,
             'last_extrainfo' => NULL,
             'last_time' => 1418521284.253386,
             'loggingquery' => false,
             'used_for_db_sessions' => false,
             'transactions' => 
            array (
            ),
             'force_rollback' => false,
             'settingshash' => 'c9a156d609a500ec3a90d9e5a94d99a3',
             'metacache' => NULL,
             'disposed' => NULL,
             'fix_sql_params_i' => 2,
             'inorequaluniqueindex' => 1,
          )),
           'type' => 'cron',
           'openlocks' => 
          array (
          ),
        )),
        1 => 'auto_release',
      ):Coding error detected, it must be fixed by a programmer: \core\lock\lock() has fallen out of scope without being released.
      Locks must ALWAYS be released by calling $mylock->release().
      root@offsite:/home/pcilms/moodle27# 
      

        Attachments

        1. mailsettings.jpg
          mailsettings.jpg
          211 kB
        2. message_handler_1.jpg
          message_handler_1.jpg
          91 kB
        3. message_handler_2.jpg
          message_handler_2.jpg
          46 kB
        4. moodle_diff.txt
          443 kB
        5. private_file_profile.jpg
          private_file_profile.jpg
          37 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Jan/15