Events After saving / updating nodes of type happen before record is written to database
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- PHP
- Stelle
- 5
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di backdrop-contrib/rules
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
backdrop-contrib/rules#250 · 7 commenti ·
-
Upgrade path from Drupal incomplete - action drupal_message: Execution implementation is missingAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
backdrop-contrib/rules#240 ·
-
[WIP] Throw warning upon importing rules with unsupported actions or eventsForse già presa @argiepiano l’ha presa 1604 giorni fa. Apertapr - needs work
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
backdrop-contrib/rules#159 · 8 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
backdrop-contrib/rules#144 · 8 commenti ·
-
Coding StandardsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
backdrop-contrib/rules#91 ·
Tutte le issue di backdrop-contrib/rules
Issue simili
-
domain/discovery
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Admin search throws for permissions added through Admin.generalIndexItems('permissions', ...)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
neos/flow-development-collection#3639 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
The PHP version check in prepare.php still allows PHP 7.2 and 7.3Forse già presa @ekamran l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WordPress/phpunit-test-runner#359 ·
I maintainer di solito rispondono entro 2 giorni
-
ObjectMapper
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
symfony/symfony-docs#23390 ·
I maintainer di solito rispondono entro 2 giorni