Tag: Entity reference

Auto-creating Drupal user entities with custom entity reference selection plugin

Creating users on the fly through Drupal's entity reference fields doesn't work out of the box because user entities need more than just a label. The core implementation tries but fails to properly generate usernames, emails, and passwords from the provided text. This tutorial shows how to fix this with a custom Entity Reference Selection plugin.

Migrate existing Entity Reference field to Entity Reference Revisions field

Entity Reference and Entity Reference Revisions fields are very similar, but the latter offers more flexibility when it comes to reverting to a previous revision in the case when you have a nested entity. Let's see the easiest way to migrate an existing Entity Reference field to an Entity Reference Revisions field.

AI Assistant