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
By default the module wipes out all fields on all entities. Sometimes it's desirable to leave some content in place.
Solution
Provide the possibility to specify a whitelist of fields/entities that don't need to be sanitized.
We provide a whitelist of entities that can be ignored instead of providing a list of entities that should be sanitized so that if new data is unknowingly added it is safely sanitized when nothing is done.
Original report
I haven't used this module yet, but this would be a great addition.
Also, FIRST!!!11!!!1!
Comment | File | Size | Author |
---|---|---|---|
#8 | entity-sanitizer-whitelist-2966030-8-D8.patch | 9.33 KB | navneet0693 |
#7 | interdiff-2966030-5-7.txt | 2.2 KB | navneet0693 |
#5 | entity-sanitizer-whitelist-2966030-5-D8.patch | 8.76 KB | navneet0693 |
Comments
Comment #2
KingdutchChanged issue title to reflect the purpose of this issue.
Comment #3
navneet0693 CreditAttribution: navneet0693 as a volunteer and commentedComment #4
KingdutchIn entity_sanitizer_drush_command
Line 76, you've removed the examples on how to do quick debugging but you've not removed the debug comment that's not actually a TODO ^^'. Please either remove all three comment lines here or leave the example intact.
Please create a ticket that describes what you dislike about the logic and create an issue in the issue queue that can be referenced.
In example.whitelist.yml
Line 211, you're only skipping
user
into it's entirety soDon't sanitize user entities.
Line 214:
Don't sanitize article bundle of node entities.
Line 216, you're working with the page bundle here:
+ # Don't sanitize titles for the node page bundle.
Line 220, this change is incorrect, please revert it.
Comment #5
navneet0693 CreditAttribution: navneet0693 as a volunteer and commentedThanks @Kingdutch for review. I have added an improved patch. I will also add a follow-up issue once the patch is in.
Comment #6
KingdutchHi Navneet,
Please create the follow-up ahead of time so it can be added to the // TODO statement. Otherwise we'll have a TODO statement in 6 months and don't know what actually needs to happen.
Additionally, when making fixes to a patch it's good practice to create an interdiff which makes reviewing the newest changes easier :) See https://www.drupal.org/documentation/git/interdiff for more info.
~ Alexander
Comment #7
navneet0693 CreditAttribution: navneet0693 as a volunteer and commentedThanks @Kingdutch, I have added the follow-up issue link in todo and also have improved coding standards.
Comment #8
navneet0693 CreditAttribution: navneet0693 as a volunteer and commented:facepalm:
for uploading an empty patch. I need more concentration:-P
Comment #10
KingdutchCommitted and tagged in 1.0-alpha10, thanks!