Drupal 7.36 was recently released:

https://www.drupal.org/drupal-7.36-release-notes

It's a bug fix and new features release, so this doesn't automatically trigger a Panopoly release like a security release would.

However, there are some interesting implications to some changes made in 7.36 that will probably affect Panopoly users: if a content type was created by a module (like a Feature module), that was later disabled, Drupal will now disable that content type. Here's the issue where the change was made:

#1441950: Node types removed from hook_node_info with base = 'node_content' cannot be deleted

While this is probably the right thing to do if you're disabling the module NOW, it's going to be totally surprising and break people's sites when they disabled the responsible module long ago. Here's a bug report about this:

#2465159: 7.36 (Issue #1441950) May Cause Node Types to be disabled

I propose adding a hook_update_N() function to Panopoly that "disowns" any content type that belongs to a module that is now disabled, so that Drupal core won't just disable it and make headaches for our users. Then going forward, when a module that owns a content type is disabled, the default Drupal core behavior will happen.

There is also this patch to Features which will cause it to "disown" any content types it created when the module is disabled:

#1055460: Disabling a feature does not disown content type

I'm not 100% convinced about including that in Panopoly, unless the Features maintainers are for it. If they are, yeah, we should include it.

CommentFileSizeAuthor
#1 panopoly_core-drupal-7.36-2468273-1.patch860 bytesdsnopek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Status: Active » Needs review
FileSize
860 bytes

Patch to fix the problem is attached (doesn't actually update to Drupal 7.36)! This is adapted from the code from NancyDru in #2465159-24: 7.36 (Issue #1441950) May Cause Node Types to be disabled. It works in my testing!

We should commit this when committing the update to Drupal 7.36.

dsnopek’s picture

I pinged @mpotter about #1055460: Disabling a feature does not disown content type and he says it looks reasonable! @hefox is going to review soon-ish

seanr’s picture

Seems to me this could bring back content types that had been disabled intentionally by disabling non-features modules that define content types?

dsnopek’s picture

In the past Drupal didn't automatically disable content types when their module was disabled - this was just added in Drupal 7.36. Although, I suppose it's possible that there is a module that does this manually in its hook_disable() or hook_uninstall(). However, I suspect that's not very common. Do you know any modules that do this?

dsnopek’s picture

Ok! There is now a Features release with the above mentioned patch. This issue now depends on updating Features:

#2446165: Update Features module to version 2.5

  • dsnopek committed b98ba45 on
    Update Panopoly Core and profile for Issue #2468273 by dsnopek: Update...
dsnopek’s picture

Status: Needs review » Fixed

Now that #2446265: Cannot add Radios or Select list fields is in, I've committed this! This takes us to Drupal 7.36 and will hopefully prevent our users from having any problems from #1441950: Node types removed from hook_node_info with base = 'node_content' cannot be deleted.

cboyden’s picture

There's discussion in #2465159: 7.36 (Issue #1441950) May Cause Node Types to be disabled about reverting the change from #1441950: Node types removed from hook_node_info with base = 'node_content' cannot be deleted and adding an update hook to undo any problems caused by updating to 7.36. Will this change anything that needs doing in Panopoly - assuming it gets in?

cboyden’s picture

dsnopek’s picture

Thanks for the heads up about this!

The patch that's being considered for Drupal core won't really conflict with what's in Panopoly: it's going to un-disable any disabled content types, whereas Panopoly's change disowns any content types that belong to disabled modules. So, what Panopoly is doing is essentially consistent with the new behavior of Features (which isn't going to be reverted), but the proposed Drupal core patch is just trying to take things back to the way they were in Drupal 7.35 and earlier (which is arguably broken - if you have a content type from a disabled Feature, it's impossible to delete that content type from the UI).

So, I'm going to keep the Panopoly change whether that Drupal core patch is merged or not!

Status: Fixed » Closed (fixed)

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