Create fieldable bundle types for an entity with Drupal Console I am trying to recreate the functionality of a NodeType/Node entity at a basic level.

I want to define entity types (FooType) which can be fielded individually, just like NodeType can be.

I used the Drupal Console to generate a config entity and content entity. Out of the box, it creates types and content entities of those types. However you can't field those types, I don't see a way to add that.

When I try to mimic the annotation in NodeType to allow fields, I get the following error when I try to save a field to a FooType:

Missing bundle entity, entity type foo_type, entity id foo.


Where am I going wrong? Is this something the Drupal Console can already do and I missed it?

Update:

So I think I am past the original issue... now when I want to add a field on a type, I get:

Attempt to create a field 'field_testfield' without a bundle.


The URLs don't seem to be correct, as it keeps dropping me back on Foo entity settings instead of stay within FooType, where I am trying to add fields to.
I eventually got it by comparing how NodeType/Node is defined:

http://cgit.drupalcode.org/user_alert/tree/src/Entity?h=8.x-1.x

Now I can have unlimited entity types and add fields to them for different content configurations of the entity.

I started out by generating a config and content entity with the Console, but found that in order to get a more intuitive user interface, I had to modify the routing.yml and some of the paths as well.

Just a note for those looking for the same functionality.