Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
0001-BR-256-adding-hook_feature_revert-to-node_subpages-b.patch | 1.69 KB | elephant.jim |
Comments
Comment #1
BrockBoland CreditAttribution: BrockBoland commentedI 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.
Comment #2
forestmars CreditAttribution: forestmars commentedThought 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.
Comment #3
forestmars CreditAttribution: forestmars commentedTook another pass at testing both the module and the patch. Here's what I've found:
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.