Problem/Motivation
Once #3002316: Optionally show warning messages when referenced entities are being edited / deleted is resolved, the entity_usage module, will have options to show usage warning messages on entity edit and delete forms. So the custom warning message from paragraphs_library should be removed.
Proposed resolution
Remove the warning message and enable the messages in entity_usage on install and update the existing sites also.
Remaining tasks
User interface changes
API changes
Data model changes
Original report by [username]
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | paragraphs_3006940_library_usage_10.patch | 7.61 KB | miro_dietiker |
| #7 | interdiff-3006940-5-7.txt | 586 bytes | arpad.rozsa |
| #7 | remove_the_usage_warning_messages-3006940-7.patch | 9.05 KB | arpad.rozsa |
| #5 | interdiff-3006940-3-5.txt | 2.71 KB | arpad.rozsa |
| #5 | remove_the_usage_warning_messages-3006940-5.patch | 9.06 KB | arpad.rozsa |
Comments
Comment #2
miro_dietikerI'm postponing this for the entity_usage dependency.
Comment #3
arpad.rozsa commentedUpdated the patch according to the latest one in the entity_usage issue. Also added drupalci.yml to include the patch from that module, so this one can be tested.
Comment #4
johnchqueI think this is the problem why tests are not passing.
We should check if the result of edit_warning_enabled is empty or an array. When I installed paragraphs_demo, this was not enabled and it might be due to I didn't have any other entity type enabled in this setting.
[EDIT] While testing, I removed the is_array check and it seems that when installing for the first time, the setting returns null, maybe check if it is null too (?).
Comment #5
arpad.rozsa commentedThanks for the review. In the meantime I already noticed this problem so I updated the logic to work when there is no message enabled already.
Comment #6
miro_dietikerLooks pretty cool. Now we need to wait for Entity Usage to be ready.
Comment #7
arpad.rozsa commentedThis might not be necessary, since it didn't introduce new changes to the main functionality, but I changed to the latest patch from the entity usage, just to be updated.
Comment #8
marcoscanoFor info, I just tagged alpha8 with #3002316: Optionally show warning messages when referenced entities are being edited / deleted included, so this could build on top of that.
Comment #9
berdirGreat, thanks!
Means we need a new patch that doesn't apply the patch anymore and then we should be good to go.
Comment #10
miro_dietiker:-)
Comment #12
miro_dietikerThus committed. Great to have this so much more clean. :-)