Score:1

What is the meaning of "fields pending deletion"?

bo flag

I have a Drupal 9.5.3 installation which is not customized in any way; no custom modules or themes.

I want to remove the Comment core module but I can't and the reason that is given is:

Fields pending deletion

That's strange because I have already deleted all comments, all comment fields in any content type and all comment types and I can't think of anything else relevant to delete.

What is the meaning of this phrase "Fields pending deletion" and what should be done to remove the module?

From a bit of reading(1)(2) I understand that running drush php-eval 'field_purge_batch(500);' or drush php-eval 'field_purge_batch(10000)'; but it is important for me as a someone who is not a PHP programmer to understand in simple terms what is the meaning of the phrase and why should these commands help.

taggartJ avatar
cn flag
Hello somo, This question has been answered here https://drupal.stackexchange.com/questions/205377/disable-the-comment-module
4uk4 avatar
cn flag
In simple terms, you don't need to do anything. Just wait until cron has completed the deletion.
somo avatar
bo flag
@4uk4 cron ran at least twice since then but I still can't remove the module with the same reason given.
cn flag
It's batched so will take as many runs as needed (num entries / batch size). You can also run `field_purge_batch` manually if you can't or don't want to wait, like you mentioned. That function is what the cron job runs, so you're doing exactly the same thing by executing it.
somo avatar
bo flag
I don't understand what is the meaning of "batched" here and especially why this function won't run in any cron run. These articles didn't give me a clear understanding of the term. https://www.drupal.org/docs/7/api/batch-api/overview and https://api.drupal.org/api/drupal/core%21includes%21form.inc/group/batch/10 and https://www.drupal.org/project/batch
Score:1
cn flag

The fields are deleted by cron runs. If you have a lot of comments this can take a while.

To speed things up you can use the mentioned Drush command, but if Drush is not available there is also a UI solution. Go to the page /admin/config/development/configuration/single/import, select "Simple configuration", enter the configuration name field.settings and add this config with a higher batch size:

purge_batch_size: 1000

See this screenshot:

enter image description here

Now each automatic cron run will delete more items and the waiting time will be much shorter. If you are in a hurry you can press the button on this page /admin/config/system/cron until the job is finished.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.