Process workflows scheduled task fails due to missing 'eventid'

Đang mở
#142 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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"
Ngôn ngữ chính
PHP
Star
46
Fork
29
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của catalyst/moodle-tool_trigger

Tất cả issue của catalyst/moodle-tool_trigger

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.