1

Half of our content types have had their publication status fields overridden. The override is causing the fields to read "Publishing status" and have the description "A boolean indicating whether the node is published." I believe this is the same problem described in this comment. The row names are in the format core.base_field_override.node.[content-type].status in the database.

However, I am unsure of how to properly remove these overrides. Certainly I could just delete that row of the config table, but I am unaware of what consequences that may have or whether that would be the appropriate way to handle this one-time problem.

Can anyone tell me the correct way to remove base field overrides? Thanks!

  • There is a reason that base field override exists, core uses it a) to store the default value of the status/published checkbox of a certain node type (although that's not so important anymore if you use content moderation, but then you also wouldn't see the description) and b) whether or not it can be translated. By deleting it, you're also resetting that information back to the default. Instead of delete, adjust the label/description. – Berdir Oct 30 '18 at 1:06
2

Don't modify the config table. Export the config, delete the yaml file and import the config again.

From the command line you can delete configuration items with drush:

drush config:delete core.base_field_override.node.[content-type].status
  • I will mark this as correct as soon as I can confirm it fixes my problem. I'm currently getting an error when I try to import the config. Error while opening ... in write binary mode. But that's unrelated. – Travis Oct 26 '18 at 15:49
  • If it doesn't work in UI then put the config in the sync folder and use drush cim. – 4k4 Oct 26 '18 at 15:54
  • Yeah, unfortunately drush isn't configured on this site. I'll troubleshoot the config UI though. To check that I understand your answer correctly, you're saying the config export/import and the drush command are two different ways to solve the problem, correct? – Travis Oct 26 '18 at 16:15
  • It's a long time since I've used the config UI, because normally I do this in drush. Without drush and if importing the tar ball doesn't work, then put the config in the config/sync folder of your Drupal install and synchronize it in UI. – 4k4 Oct 26 '18 at 16:17
0

This is another solution. With Base Field Override UI module you can delete that configuration from the UI.

The Base Field Override UI module enables an interface to be able to change the labels and descriptions of the fields that have been created by code using the BaseFieldDefinition class (Example, the title field of the node entity).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.