Clean Drupal 7.26 installation, fresh OG 7.x-2.x
1. Enable OG and OG access control modules.
2. Create new content type and mark it as a group.
3. Check you can go to its "OG roles overview" via admin/config/group/roles.
4. Create another new content type and mark it as a group.
5. While it can be seen in admin/config/group/roles, the "edit" link to its role does not work, but does not give any error either.
6. Create 3rd content type and mark it as a group.
7. The 3rd content type roles "edit" link won't work, but suddenly the 2nd one will start working.

I think it is similar to the first behavior detailed in https://drupal.org/node/2175713 (but not a duplication).

CommentFileSizeAuthor
#4 clear_entity_info_cache-2203205.patch1.41 KBshushu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shushu’s picture

shushu’s picture

Update: clearing cache after creation of the content type solves the problem. Guess some too much dependence on the caching cause this. Checking.

shushu’s picture

Update: creation of the menu item via og_ui_menu() does not work since while saving the new content type calling entity_get_info() via og_get_all_group_bundle() does not return the content type being saved.
Need to check whether it is an expected behavior of entity_get_info() or a bug.

shushu’s picture

Status: Active » Needs review
Issue tags: +Clear cache
FileSize
1.41 KB

entity_get_info() uses fast cache, hence new bundles does not exist after saving.
Simple solution is calling entity_info_cache_clear() before adding the menu items via hook_menu().