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

Notices running the mail pickup task

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup
      Get inbound messaging for forums working. (You can refer to MDL-48227 for the setup)

      TEST

      1. Enable availability.
      2. Make a forum post.
      3. Go to your email client and reply to forum post via email.
      4. Run the pickup task

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

      5. Make sure no notices are shown during the execution of the task.
      6. Make sure the response gets posted in the forum
      Show
      Setup Get inbound messaging for forums working. (You can refer to MDL-48227 for the setup) TEST Enable availability. Make a forum post. Go to your email client and reply to forum post via email. Run the pickup task php admin/tool/task/cli/schedule_task.php --execute="\\tool_messageinbound\\task\\pickup_task" Make sure no notices are shown during the execution of the task. Make sure the response gets posted in the forum
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull Master Branch:
      MDL-48704-master
    • Sprint:
      Team B Sprint 1

      Description

      Detected while testing MDL-48593, it seems that the pickup task shows various PHP Notices here and there. No matter of that the incoming mail was properly handled and routed to forum post.

      Scheduled task: Incoming email pickup
      Connecting to imap.gmail.com as moodle.development@gmail.com...
      Connection established.
      Searching for Unseen, Unflagged email in the folder 'INBOX'
      Found 1 messages to parse. Parsing...
      - Parsing message 191
      -- Subject:	ee
      -- From:	stronk7@contiento.com
      -- Recipient:	moodle.development+AAAAAAAAAAIAAAAAAAAABQAAAAAAAABAGO1W135J7x0HdkPK@gmail.com
      -- Processing the message as user 5 (alu2).
      -- Validation completed. Fetching rest of message content.
      --> Passing to Inbound Message handler \mod_forum\message\inbound\reply_handler
      PHP Notice:  Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 1789
      PHP Stack trace:
      PHP   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
      PHP   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
      PHP   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
      PHP   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
      PHP   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
      PHP   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
      PHP   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
      PHP   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
      PHP   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
      PHP  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
      PHP  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
       
      Notice: Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 1789
       
      Call Stack:
          0.0004     261800   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
          0.1898   19142880   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
          0.1911   19397800   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
          2.1139   23524384   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
          4.1536   30728800   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
          4.1536   30729432   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
          4.1536   30729528   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
          4.2176   38106024   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
          4.2204   38248488   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
          4.2204   38248488  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
          4.2204   38248536  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
       
      PHP Notice:  Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 2637
      PHP Stack trace:
      PHP   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
      PHP   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
      PHP   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
      PHP   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
      PHP   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
      PHP   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
      PHP   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
      PHP   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
      PHP   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
      PHP  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
      PHP  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
      PHP  12. section_info->__get() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1809
      PHP  13. section_info->get_available() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:2610
       
      Notice: Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 2637
       
      Call Stack:
          0.0004     261800   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
          0.1898   19142880   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
          0.1911   19397800   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
          2.1139   23524384   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
          4.1536   30728800   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
          4.1536   30729432   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
          4.1536   30729528   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
          4.2176   38106024   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
          4.2204   38248488   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
          4.2204   38248488  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
          4.2204   38248536  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
          4.2209   38251120  12. section_info->__get() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1809
          4.2209   38251328  13. section_info->get_available() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:2610
       
      PHP Notice:  Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 1877
      PHP Stack trace:
      PHP   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
      PHP   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
      PHP   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
      PHP   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
      PHP   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
      PHP   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
      PHP   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
      PHP   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
      PHP   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
      PHP  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
      PHP  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
      PHP  12. cm_info->update_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1818
       
      Notice: Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 1877
       
      Call Stack:
          0.0004     261800   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
          0.1898   19142880   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
          0.1911   19397800   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
          2.1139   23524384   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
          4.1536   30728800   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
          4.1536   30729432   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
          4.1536   30729528   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
          4.2176   38106024   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
          4.2204   38248488   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
          4.2204   38248488  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
          4.2204   38248536  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
          4.2214   38271920  12. cm_info->update_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1818
       
      PHP Notice:  Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 1923
      PHP Stack trace:
      PHP   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
      PHP   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
      PHP   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
      PHP   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
      PHP   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
      PHP   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
      PHP   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
      PHP   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
      PHP   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
      PHP  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
      PHP  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
      PHP  12. cm_info->update_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1818
      PHP  13. cm_info->is_user_access_restricted_by_capability() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1891
       
      Notice: Object of class stdClass could not be converted to int in /Users/stronk7/git_moodle/integration/lib/modinfolib.php on line 1923
       
      Call Stack:
          0.0004     261800   1. {main}() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:0
          0.1898   19142880   2. tool_messageinbound\task\pickup_task->execute() /Users/stronk7/git_moodle/integration/admin/tool/task/cli/schedule_task.php:127
          0.1911   19397800   3. tool_messageinbound\manager->pickup_messages() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/task/pickup_task.php:52
          2.1139   23524384   4. tool_messageinbound\manager->process_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:170
          4.1536   30728800   5. tool_messageinbound\manager->send_to_handler() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:408
          4.1536   30729432   6. core\message\inbound\address_manager->handle_message() /Users/stronk7/git_moodle/integration/admin/tool/messageinbound/classes/manager.php:790
          4.1536   30729528   7. mod_forum\message\inbound\reply_handler->process_message() /Users/stronk7/git_moodle/integration/lib/classes/message/inbound/address_manager.php:451
          4.2176   38106024   8. core_availability\info_module::is_user_visible() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:120
          4.2204   38248488   9. cm_info->__get() /Users/stronk7/git_moodle/integration/mod/forum/classes/message/inbound/reply_handler.php:215
          4.2204   38248488  10. cm_info->get_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1162
          4.2204   38248536  11. cm_info->obtain_dynamic_data() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1830
          4.2214   38271920  12. cm_info->update_user_visible() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1818
          4.2217   38272512  13. cm_info->is_user_access_restricted_by_capability() /Users/stronk7/git_moodle/integration/lib/modinfolib.php:1891
       
      --> Created a post 65 in 43.
      ---> Success notification sent to stronk7@wimski.org.
      -- Marking the message for removal.
      -- Returning to the original user.
      -- Finished processing 191
      

      Ciao

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ankit_frenz Ankit Agarwal
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Peer reviewer:
                Dan Poltawski
                Integrator:
                Andrew Nicols
                Tester:
                Adrian Greeve
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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