Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

eZ Platform Field Type gotcha: No type registered for...

When creating a new field type in eZ Platform, it's easy to miss that each field type needs to have defined an indexable class. This will lead to errors like this....

Indexing Content...
  12/352 [>---------------------------]   3%
  No type registered for myfieldtypeidentifier. 

...when indexing with the Solr Bundle. The fix is to define an indexable service in services.yml for your fieldtype. If you don't want to index the item, then set it to be the unindexed class with the parameter ezpublish.fieldType.indexable.unindexed.class:

    class: %ezpublish.fieldType.indexable.unindexed.class%
        - {name: ezpublish.fieldType.indexable, alias: myfieldtypeidentifier}

A bit confusingly this does not have anything to do with the isSearchable method in the class containing the Type itself.

Learn more about eZ Platform Field Type API and best practices

Written by Jani Tarvainen on Tuesday May 24, 2016
Permalink -

« Setting a default pagelayout for content in eZ Platform - Use the eZ JavaScript Client (CAPI) for a headless CMS implementation »