0

I've created a custom entity and allowed administrators to add custom fields to this entity using the "Manage Fields" Form; however, the custom fields I add to the entity does not appear in the list that pops up when trying to "Add Fields" in a view.

How does one go about making custom fields appear in the Views?

2
  • Possible duplicate of Expose custom entity to views
    – ssibal
    Jun 1, 2018 at 6:59
  • Hmmm, although I do acknowledge that the two are similar, the Base Fields for my Entity does appear in the Add Fields section of the view my problem is the additional custom fields. In addition, I've already tried the answer accepted as well as the update answer but to no avail.
    – nyan0000
    Jun 1, 2018 at 7:19

1 Answer 1

2

I ran into this just today. Turns out you shouldn't set data_table in the entity type annotation if translatable is FALSE. Otherwise views associates all of the fields with the data_table, but data_table is never associated with base_table due to translations being disabled.

1
  • Thanks! That was a tricky bug to figure out.
    – Jaypan
    Jun 21, 2021 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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