When creating an entity module from the model module by replacing model and Model, it appears that
if the name choosen to replace model is alphabetically before "comment", the entity does work correctly.
That is to say in the content tab (admin/content/) a new entity instance cannot be created.
For example :
the entity name "col" does not work and the enity name "con" works

Any idea ?
Thanks a lot

Comments

marcver created an issue. See original summary.

marcver’s picture

Solved.
The problem comes from the fact that the entity view may be or may be not created at the install time of the MODULENAME module.
This is due to a bug in the model module : according to the documentation, the hook hook_views_default_views should be placed in a file named MODULENAME.views_default.inc
see https://api.drupal.org/api/views/views.api.php/function/hook_views_defau...
But in the model module, this file is named MODULENAME.views.inc
As a consequence, the view may or may not randomly be created.
As far as I can see, renaming MODULENAME.views.inc in MODULENAME.views_default.inc solved my problem.

marcver’s picture

Title: Entity Module Name bugs if before Comment » MODULENAME.views.inc should be renamed to MODULENAME.views_default.inc