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.
I've just implemented hook_domain_batch in a custom module and now I have issues creating Views page displays. They create fine but don't add an entry to the menu_router table and therefore are not viewable. After 2 hours or so of debugging I found that weight is not actually "optional" as per the documentation in domain.api.php.
I've resolved this in the attached patch by defaulting the weight to 0 in domain_menu() if it's not set.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1509108-weight-batch-d6.patch | 415 bytes | agentrickard |
#4 | 1509108-Not-setting-weight-in-hook_domain_batch-72.patch | 458 bytes | agentrickard |
Not-setting-weight-in-hook_domain_batch-prevents-Vie.patch | 803 bytes | mstrelan |
Comments
Comment #1
agentrickardWow. Nice catch.
Comment #2
agentrickardDo you have any idea what error is being thrown that stops menu rebuild from working?
Comment #3
agentrickardPushed to 7.x.3.
Comment #4
agentrickardPatch for 7.x.2.
Comment #5
agentrickardPatch for 6.x.