Process workflows scheduled task fails due to missing 'eventid'

オープン
#142 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
backend

調査の方向性

Start with admin/tool/trigger/classes/event_processor.php at the record_workflow_trigger() call shown in the backtrace, then trace how process_workflows.php supplies eventid when it records a workflow trigger. Reproduce the scheduled task failure using the reported Moodle 3.10.4 setup and inspect the history insert. Done when the task no longer attempts to write a null eventid and the workflow history is recorded successfully.

索引モデルが issue の本文から書いたものです。

説明

bug

The "Process workflows" scheduled cron task fails repeatedly. The query running is trying to insert a null value into a table that doesn't allow null values. The 'eventid' column within the mdl_tool_trigger_workflow_hist table on the site's database is numerical values only.

... started 07:35:25. Current memory use 19.5MB.
Executing workflow: 1
... used 9 dbqueries
... used 0.052000045776367 seconds
Scheduled task failed: Process workflows scheduled task. (tool_trigger\task\process_workflows),Error writing to database
Debug info:
Column 'eventid' cannot be null
INSERT INTO mdl_tool_trigger_workflow_hist (workflowid,number,timecreated,event,eventid) VALUES(?,?,?,?,?)
[array (
  0 => 1,
  1 => 34,
  2 => 1624430125,
  3 => 'false',
  4 => NULL,
)]
Backtrace:
* line 1357 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1403 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 300 of /admin/tool/trigger/classes/event_processor.php: call to mysqli_native_moodle_database->insert_record()
* line 175 of /admin/tool/trigger/classes/task/process_workflows.php: call to tool_trigger\event_processor::record_workflow_trigger()
* line 142 of /admin/tool/trigger/classes/task/process_workflows.php: call to tool_trigger\task\process_workflows->process_item()
* line 91 of /admin/tool/trigger/classes/task/process_workflows.php: call to tool_trigger\task\process_workflows->process_queue()
* line 253 of /lib/cronlib.php: call to tool_trigger\task\process_workflows->execute()
* line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 178 of /admin/cli/cron.php: call to cron_run()
  • Moodle version: 3.10.4 (Build: 20210510)
  • "pluginversion":"2021030400"
主要言語
PHP
スター
46
フォーク
29
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

catalyst/moodle-tool_trigger のほかの issue

catalyst/moodle-tool_trigger の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。