I have a feature with an exported $node and associated menu link. The menu link isn't created unless the node already exists.

On a fresh install the exported node is created, but the menu link is not. Reverting the feature with the node present resolves the issue.

Deleting the node and reverting the feature only creates the node: I must re-revert the feature with the node in place in order for the menu link to be created.

It seems the solution is to have the exported menu links component revert after the exported node component.

CommentFileSizeAuthor
#3 uuid_features.install.txt448 bytesezra-g

Comments

ezra-g’s picture

I know that you can control the order in which components are reverted *within a module that defines that type of component*, but I'm not sure that Features supports ordering which types of components are reverted first, unless we can control it with module weight.

ezra-g’s picture

Title: Node component should revet before exported menu links » Node component should revert before exported menu links
ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new448 bytes

Indeed, the order in which components are reverted is determined by features_get_components(), which calls features_include() which does foreach (module_implements('features_api',FALSE) as $module) { which is determined by module weight and name.

Attached is a new .install file renamed to .txt for easy reviewing.

I plan to commit this tomorrow but it would be great to get a review. Otherwise, it's probably best reviewed over time in the dev snapshot anyway.

ezra-g’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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