Problem/Motivation
Consider this scenario: A node with a radioactivity field is unpublished by default, the field has a default value to give it an initial value. It is expected that the energy will only decay once the node is published.
Currently, it decays regardless of the published state.
Proposed resolution
Make it depending on the state. Assuming the entity extends EntityPublishedInterface
Remaining tasks
- Write a patch
- Write a test for this scenario
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 2994104-10.patch | 7.42 KB | sutharsan |
| #2 | radioactivity-unpublished-2994104-2.patch | 1.08 KB | sutharsan |
Comments
Comment #2
sutharsan commentedNeeds work for additional test.
Comment #3
sutharsan commentedI also credited @Heine, who originally wrote this patch.
Still needs work for adding a test.
Comment #5
sutharsan commentedComment #6
sutharsan commentedoops, still needs tests
Comment #7
sutharsan commentedComment #8
sutharsan commentedThis is embarrassing, the original issue never got fixed. Energy emits are not processed, but decay still is for not-published entities.
Comment #9
sutharsan commentedComment #10
sutharsan commentedComment #11
sutharsan commentedComment #12
sutharsan commentedCreated a follow-up #3212915: Unpublished entities should not emit energy to prevent unpublished entities to emit energy.
Comment #14
sutharsan commented