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).
Comment | File | Size | Author |
---|---|---|---|
#4 | clear_entity_info_cache-2203205.patch | 1.41 KB | shushu |
Comments
Comment #1
shushu CreditAttribution: shushu commentedComment #2
shushu CreditAttribution: shushu commentedUpdate: clearing cache after creation of the content type solves the problem. Guess some too much dependence on the caching cause this. Checking.
Comment #3
shushu CreditAttribution: shushu commentedUpdate: 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.
Comment #4
shushu CreditAttribution: shushu commentedentity_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().