Hello,
I just realized that commons_media is using commons_groups_get_group_content_entity_types(), but it hasn't got commons_groups as dependencie.
This could lead to a Fatal error: Call to undefined function commons_groups_get_group_content_entity_types() when disabling some modules/features.

My use case, could be tricky because of my config, but these where the steps:

  1. drush dis title -y
  2. The following extensions will be disabled: title, commons_bw, commons_pages, commons_posts
  3. drush cc all
  4. Fatal error: Call to undefined function commons_groups_get_group_content_entity_types()

@devincarlson talked to me in IRC (thanks!) and told me that could be better to use commons_entity_integration_info() instead.

I've attached an aproaching patch (3.14 version, maybe not very well indented and maybe the path to the root folder of the module is not good), if you guys think that this is the way to do it, I will reroll it in dev version.

Comments

tuwebo’s picture

Better to check for isset, sorry about that.

tuwebo’s picture

Making the patch relative to commons_media

tuwebo’s picture

Title: Commons media could lead to a fatal error when using commons_groups_get_group_content_entity_types() » commons_media should use commons_entity_integration_info
Version: 7.x-3.14 » 7.x-3.x-dev
StatusFileSize
new1.19 KB

Changing issue title and patch reroll to the 7.x-3.x version

japerry’s picture

Status: Active » Fixed

Fixed! Indeed commons_entity_integration_info() is the way to go. I did some minor cleanup of the patch and tested, and it looks good with features showing default still.

  • japerry committed 1c077d9 on 7.x-3.x
    Issue #2291967 by Devin Carlson, TuWebO: Use...

Status: Fixed » Closed (fixed)

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