Skip to content

Retrieve ID of Administer menu item from passed params

haystack requested to merge haystack/civirules:issue-11 into master

When this Extension is in use in WordPress Multisite, the Navigation Menu is broken is exactly the way described in #11 (closed) when the domain_id is not the primary one.

The reason is that CRM_Core_DAO::getFieldValue() does not default to the current domain_id and returns the first item that it finds - which is the menu item for the primary domain_id. This causes the CiviRules menu item to be improperly added.

The $params passed to civirules_civicrm_navigationMenu() do however contain the correct menu data, so searching the array produces the correct ID for the "Administer" menu.

Merge request reports

Loading