It may be a stupid question, but I don't quite understand how to go around drush entity-updates from Drupal Version 8.7 on.

For example on /admin/reports/status, it says:


  • The Language field needs to be updated.

The textbox is a custom entity.

I've read https://www.drupal.org/node/3034742 and I understand what I had to do if I knew what I want to update and how. In this case, I just don't know what to write inside the update function. The notice says that the "language" field needs to be updated, but not exactly what about that field.

I think I am missing something really simple here, but I don't get it.

  • Have you come across drupal.org/project/devel_entity_updates yet? – Clive Jul 3 '19 at 10:16
  • Yes, but it says that's it's just a developer tool and should not be used in production or in deployment workflows. I think I could of course enable that module on production, run "drush entup" and disable again. But that seems more like a workaround? – Frank Drebin Jul 3 '19 at 10:20
  • Sure, I guess that depends mostly on your point of view and immediate needs. The reason this case might be difficult for you is that it's your custom entity type, so in theory only you should know what's changed (and should be able to write the update code accordingly). I might be wrong, but I think using the API to determine what's changed involves digging out the internal methods that Drupal itself uses, and inspecting the data along the way (I tried it once myself and couldn't find a better way) – Clive Jul 3 '19 at 10:41
  • The immediate needs depend mainly on whether the module is deployed and holds production data. In other cases you could simply re-install the module or use the Devel Entity Updates module if you want to apply code changes without re-installing. – 4k4 Jul 3 '19 at 11:37
  • Oh alright, then I wasn't on a wrong path, because that's what I tried to do (inspecting the "getChangesList" output). I just thought that it shouldn't be necessary to debug core code for that. Anyways, thank you both for the clarification. – Frank Drebin Jul 3 '19 at 13:43

Your Answer

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

Browse other questions tagged or ask your own question.