Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-2342

ForumNG: Error in cron when trying to mark messages as sent (again)


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Linux (RHEL), PHP5.1.6, MySQL5.0.77 (using mysqli)
    • Database:
    • Affected Branches:


      As a previous tracker cron job fails to send emails :
      (tested on both current CVS version of forumng and stable version 1.6 - stable version 1.8 does not seem to work at all on our server)

      Processing module function forumng_cron ...
      Email processing:
      Initial query: Marking processed posts: A forum exception occurred and forum cron was aborted: Failed to execute SQL
      mailstate = 1
      id IN (SELECT fp.id
      mdl_forumng_posts fp
      INNER JOIN mdl_user u ON fp.userid=u.id
      LEFT JOIN mdl_user eu ON fp.edituserid=eu.id
      LEFT JOIN mdl_forumng_posts reply ON fp.parentpostid = reply.id
      LEFT JOIN mdl_user replyu ON reply.userid = replyu.id
      LEFT JOIN mdl_user replyeu ON reply.edituserid = replyeu.id
      INNER JOIN mdl_forumng_discussions fd ON fp.discussionid = fd.id
      INNER JOIN mdl_forumng_posts discussionpost ON fd.postid = discussionpost.id
      INNER JOIN mdl_forumng f ON fd.forumid = f.id
      INNER JOIN mdl_course_modules cm ON f.id = cm.instance
      INNER JOIN mdl_context x ON x.instanceid = cm.id
      INNER JOIN mdl_course c ON c.id = f.course
      INNER JOIN mdl_forumng clonef
      ON (clonef.originalcmid = cm.id OR (f.shared=1 AND clonef.id = f.id))
      INNER JOIN mdl_course_modules clonecm ON clonef.id = clonecm.instance
      INNER JOIN mdl_modules m ON m.id = cm.module AND m.id = clonecm.module
      – Skip future posts (this is more relevant when using the set state
      – version of the query)...
      fp.created < 1283885701

      – Post must not have been mailed yet, also wait for editing delay if
      – not set to mailnow
      AND ((fp.mailstate = 0
      AND fp.created < 1283883901)
      OR fp.mailstate = 4)

      – Don't mail out really old posts (unless they were previously hidden)
      AND (fp.created > 1283712901 OR fd.timestart > 1283712901)

      – Discussion must meet time requirements
      AND fd.timestart < 1283885701
      AND (fd.timeend = 0 OR fd.timeend > 1283885701)

      – Post and discussion must not have been deleted and we're only looking
      – at original posts not edited old ones
      AND fp.deleted = 0
      AND fd.deleted = 0
      AND fp.oldversion = 0

      – Course-module and context limitations
      AND m.name='forumng'
      AND x.contextlevel = 70)

      #0 /home/moodle/moodle/mod/forumng/forum_utils.php(603): forum_utils::execute_sql('?UPDATE? mdl...')
      #1 /home/moodle/moodle/mod/forumng/forum_mail_list.php(252): forum_utils::update_with_subquery_grrr_mysql('?UPDATE? mdl...', 'SELECT fp.id ?F...')
      #2 /home/moodle/moodle/mod/forumng/forum_mail_list.php(56): forum_mail_list->mark_mailed('1283885701')
      #3 /home/moodle/moodle/mod/forumng/forum_cron.php(199): forum_mail_list->__construct(true)
      #4 /home/moodle/moodle/mod/forumng/forum_cron.php(160): forum_cron::email_normal()
      #5 /home/moodle/moodle/mod/forumng/forum_cron.php(24): forum_cron::email()
      #6 /home/moodle/moodle/mod/forumng/lib.php(110): forum_cron::cron()
      #7 /home/moodle/moodle/admin/cron.php(117): forumng_cron()


        Gliffy Diagrams




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


                • Created: