Events After saving / updating nodes of type happen before record is written to database
まだ誰も着手していません。
評価
調査の方向性
Start by reading node_save(), hook_node_insert(), and hook_node_update(), then compare their transaction timing with the Rules events described in the issue. Trace the node save events and review the linked Drupal issue and current documentation. Done means the event semantics and user-facing labels or behavior are clearly aligned, with coverage for the resulting expectation.
索引モデルが issue の本文から書いたものです。
説明
The UI for rules events is misleading.

There are several possible events that say "after" but the actions happen before. I confirmed this using Rules Throttle which I ported so I could check in a view whether the change had happened.
It is very misleading as there is also an event that says "before saving content". If all the "after" events actually take place before the save, what does the "before" event do?
I've come across this on nodes, but I think this could apply across the board on other entities. I couldn't find anything on our issue queue but checked on Drupal and found this:
https://www.drupal.org/project/rules/issues/2877239
I then looked up our docs which both say:
Note that when this hook is invoked, the changes have not yet been written to the database, because a database transaction is still in progress. The transaction is not finalized until the save operation is entirely completed and node_save() goes out of scope. You should not rely on data in the database at this time as it is not updated yet. You should also note that any write/update database queries executed from this hook are also not committed immediately. Check node_save() and db_transaction() for more info.
https://docs.backdropcms.org/api/backdrop/core%21modules%21node%21node.api.php/function/hook_node_insert/1
https://docs.backdropcms.org/api/backdrop/core%21modules%21node%21node.api.php/function/hook_node_update/1
I have two questions:
- Is there any way in rules to do actions after the save event?
- Should we be looking to improve the UX here so that user expectations are managed?
- 主要言語
- PHP
- スター
- 5
- フォーク
- 10
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
backdrop-contrib/rules のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
backdrop-contrib/rules#250 · コメント 7 件 ·
-
Upgrade path from Drupal incomplete - action drupal_message: Execution implementation is missingオープン
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
backdrop-contrib/rules#240 ·
-
[WIP] Throw warning upon importing rules with unsupported actions or events対応中かも @argiepiano が 1595 日前に担当しました。 オープンpr - needs work
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
backdrop-contrib/rules#159 · コメント 8 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
backdrop-contrib/rules#144 · コメント 8 件 ·
-
Coding Standardsオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
backdrop-contrib/rules#91 ·
backdrop-contrib/rules の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
codeigniter4/CodeIgniter4#10616 ·
メンテナーはふだん 1 日以内に返信
-
bug code quality
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SemanticMediaWiki/SemanticMediaWiki#7149 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
google/site-kit-wp#13825 ·
メンテナーはふだん 3 日以内に返信
-
Made by AI module: MCP type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信