It appears hook_features_revert() is missing. After a features-revert, hook_default_node_subpages_path() does get picked up by _ctools_export_get_defaults() in ctools_export_load_object(). However, the node_subpages table never gets written to; ctools does not know about the custom table. Because the node_subpages table isn't updated, the subpages defined by node_subpages_menu() never get created/updated.

Attached is a patch that implements hook_features_revert() that writes a record to the node_subpages table for each default in the feature.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BrockBoland’s picture

I haven't had time for this module in a long while; is anyone else using this patch successfully? I'd like a second set of eyes on it before I commit it.

forestmars’s picture

Status: Active » Needs review

Thought this would be a quick RTBC, but unfort, no, seems messier to say the least.

Using the unpatched module I'm able to export subpages in a feature and create them on another site. So far so good. Without diving further down the rabbit hole, I don't know how that is affected by the missing function / db anomaly.

Then it gets complicated. Subpages so exported don't seem to be alterable in any way on the remote site. They can't be edited or deleted, so no overrides are even possible.
New subpages work fine and can be edited/deleted.

Applying this patch doesn't change that behaviour. This is the first time I've used this module, and would like to make a closer inspection of what's happening. I presume Jim's patch is sound and well-thought out, bc that's just how he rolls, so looking forward to figuring this out and getting this RTBC'd.

I think this module badly needs a maintainer, not just bc it's languished for a while now, but I'm seeing all sorts oddities/errors with it.

forestmars’s picture

Status: Needs review » Needs work

Took another pass at testing both the module and the patch. Here's what I've found:

  1. Without the patch, node_subpages can export configuration and revert such code configuration to the database. However it is not able to clear the override flag, so that any feature with an exportable from this module stays 'stuck' and reports as being overridden when it is not.
  2. Additionally, as noted in #2, it does not seem to be possible to edit subpage configuration once created (?!) but this does not appear to be related to featurization. (and also not related to this patch.)
  3. After applying this patch, features revert still does not clear the overrides.

Therefore I cannot mark this patch as RTBC. Hoping to have more time myself to investigate why this patch is still not clearing the falsely reported overrides.