I created a hierarchy with a regional structure. Simplified here, because my Hierarchy has 6 levels from country (1) to places (6):
Country > Region > Places
Every step represented by its own content type with different CCK field setups.
If i try to create a country it does not show up in the menu thats assigned to the hierarchy UNLESS i enable Country under "Allowed child node types" for Country itself.
Confusing:
- The strange thing is that Countries that are not listet in the custom menu still have (at fist sight) random child nodes.
- Even if the country is not listed in the menu i can add a Region, which then gets listed in the menu (without having regions enabled as children for regions)
Comments
Comment #1
derjochenmeyer commented- NO mlid>nid relationship gets saved to the database in nodehierarchy_menu_links.
- $node->nodehierarchy_old_menu_links AND $node->nodehierarchy_menu_links arrays are missing. Checked with print_r($node) in _nodehierarchy_update_insert_node()
This seems to be the fault of nodehierarchy.module line 317:
Why is it neccessary to check "nodehierarchy_node_can_be_child" here. A content type may be used only at the top level.
Comment #2
derjochenmeyer commentedI dont know enough about this module but a working and logical fix is the atached patch for nodehierarchy_nodehierarchy_node_form().
Comment #3
derjochenmeyer commentedChanging the title.
Comment #4
mr.alinaki commentedThanks for the patch! I have unpredictable menu creation before with 2.x, but that patch have to solve my problem.
Comment #5
ronan commentedThanks for the patch. Committed it with a few tweaks.