Steps to simulate the error:

1. Create a custom entity by drupal console.
2. Create a new field in this entity via UI.

The error "There was a problem creating field FIELD_NAME: 'type' not found" shows up.

The field was create, but is empty when I create a new content.

CommentFileSizeAuthor
#3 2868303-fix-bundle-key.patch1.14 KBcolorfield
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jkamizato created an issue. See original summary.

WhereverPanda’s picture

Priority: Normal » Major

+1

Happens to me as well trying to add a serial field on a taxonomy type (using Drupal 8.4.2). This makes this module unusable on Drupal 8.

colorfield’s picture

Assigned: Unassigned » colorfield
Status: Active » Needs review
FileSize
1.14 KB

Here is a patch that addresses the bundle key on the SerialSQLStorage::initOldEntries method, it was limited to the Node entity due to the condition set to 'type' for the entity bundle. So obviously it failed for other ContentEntityBase like custom ones or Term.

WhereverPanda’s picture

I can confirm that #3 works on Drupal 8.4.4

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Yeah this seems to resolve a problem running drush entup

[error] Unable to determine class for field type 'serial' found in the 'field.storage.node.field_paper_id' configuration

superlolo95’s picture

+1 for #3

  • colorfield committed d81f68b on 8.x-1.x
    Issue #2868303 by colorfield, jkamizato: Type not found for custom...
colorfield’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @all for the review!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.