Uninstall does not happen without also throwing errors

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

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

評価

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

調査の方向性

The stack trace points to admin/tool/trigger/classes/event_processor.php, where is_event_ignored() queries the workflows table during plugin uninstall. Start by reading that method and the event processor’s uninstall-related behavior. Reproduce the uninstall on Moodle 3.9 with tool_trigger installed, then confirm uninstall completes without database errors when the workflows table is removed.

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

説明

bug

Tested on Moodle 3.9 with latest version of tool_trigger (151ea4d)

root@50f2c74f5c17:/var/www/html# php admin/cli/uninstall_plugins.php --plugins=tool_trigger --run
Uninstalling: tool_trigger	Event Trigger
-->tool_trigger
++ Exception encountered in event observer '\tool_trigger\event_processor::process_event': Error reading from database (ERROR:  relation "mdl_tool_trigger_workflows" does not exist
LINE 2:                   FROM mdl_tool_trigger_workflows
                               ^
SELECT DISTINCT(event)
                  FROM mdl_tool_trigger_workflows
[array (
)]) ++
* line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
* line 951 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
* line 144 of /admin/tool/trigger/classes/event_processor.php: call to pgsql_native_moodle_database->get_records_sql()
* line 109 of /admin/tool/trigger/classes/event_processor.php: call to tool_trigger\event_processor->is_event_ignored()
* line 72 of /admin/tool/trigger/classes/event_processor.php: call to tool_trigger\event_processor->write()
* line ? of unknownfile: call to tool_trigger\event_processor::process_event()
* line 155 of /lib/classes/event/manager.php: call to call_user_func()
* line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
* line 834 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
* line 1474 of /lib/accesslib.php: call to core\event\base->trigger()
* line 2387 of /lib/accesslib.php: call to unassign_capability()
* line 245 of /lib/adminlib.php: call to capabilities_cleanup()
* line 1521 of /lib/classes/plugin_manager.php: call to uninstall_plugin()
* line 155 of /admin/cli/uninstall_plugins.php: call to core_plugin_manager->uninstall_plugin()
++ Exception encountered in event observer '\tool_trigger\event_processor::process_event': Error reading from database (ERROR:  relation "mdl_tool_trigger_workflows" does not exist
LINE 2:                   FROM mdl_tool_trigger_workflows
                               ^
SELECT DISTINCT(event)
                  FROM mdl_tool_trigger_workflows
[array (
)]) ++
* line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
* line 951 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
* line 144 of /admin/tool/trigger/classes/event_processor.php: call to pgsql_native_moodle_database->get_records_sql()
* line 109 of /admin/tool/trigger/classes/event_processor.php: call to tool_trigger\event_processor->is_event_ignored()
* line 72 of /admin/tool/trigger/classes/event_processor.php: call to tool_trigger\event_processor->write()
* line ? of unknownfile: call to tool_trigger\event_processor::process_event()
* line 155 of /lib/classes/event/manager.php: call to call_user_func()
* line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
* line 834 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
* line 1474 of /lib/accesslib.php: call to core\event\base->trigger()
* line 2387 of /lib/accesslib.php: call to unassign_capability()
* line 245 of /lib/adminlib.php: call to capabilities_cleanup()
* line 1521 of /lib/classes/plugin_manager.php: call to uninstall_plugin()
* line 155 of /admin/cli/uninstall_plugins.php: call to core_plugin_manager->uninstall_plugin()
++ Exception encountered in event observer '\tool_trigger\event_processor::process_event': Error reading from database (ERROR:  relation "mdl_tool_trigger_workflows" does not exist
LINE 2:                   FROM mdl_tool_trigger_workflows
                               ^
SELECT DISTINCT(event)
                  FROM mdl_tool_trigger_workflows
[array (
)]) ++
* line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
* line 951 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
* line 144 of /admin/tool/trigger/classes/event_processor.php: call to pgsql_native_moodle_database->get_records_sql()
* line 109 of /admin/tool/trigger/classes/event_processor.php: call to tool_trigger\event_processor->is_event_ignored()
* line 72 of /admin/tool/trigger/classes/event_processor.php: call to tool_trigger\event_processor->write()
* line ? of unknownfile: call to tool_trigger\event_processor::process_event()
* line 155 of /lib/classes/event/manager.php: call to call_user_func()
* line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()
* line 834 of /lib/classes/event/base.php: call to core\event\manager::dispatch()
* line 1474 of /lib/accesslib.php: call to core\event\base->trigger()
* line 2387 of /lib/accesslib.php: call to unassign_capability()
* line 245 of /lib/adminlib.php: call to capabilities_cleanup()
* line 1521 of /lib/classes/plugin_manager.php: call to uninstall_plugin()
* line 155 of /admin/cli/uninstall_plugins.php: call to core_plugin_manager->uninstall_plugin()
++ Success ++
主要言語
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 を短くまとめたダイジェスト。