But entity is to blame IMHO: #1997454: new information in entity_info should be added with hook_entity_info
This module tries to be the last alter of entity info (as it should be), but so does entity module. Entity module can use hook_entity_info instead, as it is adding new info, not really altering anything, and that will solve the problem.

Comments

Caseledde’s picture

Well, I just realised this statement in module_implements():

<?php
if ($hook != 'module_implements_alter') {
  drupal_alter('module_implements', $implementations[$hook], $hook);
}
?>

I thought altering 'module_implements_alter' within module_implements_alter() will do the job, but it isn't called because of this statement.

So you're right: It doesn't work!

But I am wondering, because it was working. How could that be. I have to think about it.

Caseledde’s picture

Status: Active » Needs review

I figured it out.

It was working, because at first I just increased the weight of display_cache in hook_install() to ensure to be the last module to alter entity_info(). But this was not working because of the implementation of hook_module_implements_alter(). So I removed hook_install and implementing hook_module_implements_alter(). But the weight was still affecting the order of the calling of hook_module_implements_alter().

I readd hook_install(), so after a complete uninstall and reinstall, this should work again.

fmizzell’s picture

Status: Needs review » Fixed

It is working for me too

Status: Fixed » Closed (fixed)

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