Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In #2828506: Introduce a plugin system for paragraphs types we have realized that the Paragraphs is still being saved more than once when create. It is because when saving the paragraph->needsSave is set to true so it is saved again.
Proposed resolution
Avoid saving, provide test coverage.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#7 | avoid_saving_more_than-2830533-7.patch | 1.46 KB | johnchque |
#7 | interdiff-2830533-3-7.txt | 1.06 KB | johnchque |
#7 | avoid_saving_more_than-2830533-7-test-only.patch | 863 bytes | johnchque |
#3 | avoid_saving_more_than-2830533-3.patch | 1.28 KB | johnchque |
#3 | avoid_saving_more_than-2830533-3-test-only.patch | 677 bytes | johnchque |
Comments
Comment #2
johnchqueFor some reason I cannot make it fail. :/
Comment #3
johnchqueOops, my bad. This should work.
Comment #6
BerdirI'd prefer a separate test block, with a comment that explains what we are testing instead of stuffing it into some existing logic.
You can keep it in this test, just do it at the end.
Comment #7
johnchqueYes, right. Moved the test. :)
Comment #14
johnchqueYes, it works now.
Comment #16
miro_dietikerCommitted, moooarrrr performance!
Still back to needs work as this fix should (also) be at ERR project in the corresponding trait.
Comment #17
johnchqueAdded to ERR in #2833102: Set needs save as False after saving an Entity we can set this issue as fixed and as soon as we get new versions we can remove what was added here.