Question

I am new to Drupal and Civicrm. The CMS I am using is Drupal.I had deleted some menu items in civicrm navigation menu. I would like to restore the origional navigation menu in civicrm. There is an option like Administer->Customize data and Screens->Navigation Menu->Add Menu item. But the problem here is The new item is getting added as child of some link. I would like to restore all the navigation menu the way it was present after installation.

Was it helpful?

Solution

The CiviCRM menu items are all in the civicrm_navigation table in your CiviCRM database. You ought to be able to repopulate them with the following method (I've never done it wholesale, but the principle is the same). You should certainly try this on a copy of your site before making the changes on your live site.

  1. Back up your database. You'll be doing some serious stuff and may need to roll back.

  2. Find the queries used in installing CiviCRM. You'll find them in sites/all/modules/civicrm/sql/civicrm_data.mysql beginning around line 18847 (you'll see the first line of "INSERT INTO civicrm_navigation"). Copy the next 500-some lines through the last query that inserts into civicrm_navigation. In 4.4.4, that should be INSERT INTO civicrm_navigation ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight ) VALUES ( @domainID, 'civicrm/report/list&reset=1', 'All Reports', 'All Reports', 'access CiviReport', '', @reportlastID, '1', 1, 10 );

  3. Now paste it into a text editor. You'll notice that each row has "@domainID". These refer to the domain you're installed on. In most cases, that will be "1", but confirm by looking in civicrm_domain and seeing that the only domain is ID 1.

  4. Do a find-and-replace, replacing all instances of @domainID with 1 (or whatever your domain ID is). (You'll also see other values set and used along the way; these make sure the nesting works.)

  5. Now, empty the civicrm_navigation table and then run the queries in MySQL. This ought to populate the table properly.

  6. Finally, you'll need CiviCRM to rebuild the menu cache. Visit http://yourdevsite.org/civicrm/menu/rebuild?reset=1 to do that.

  7. Assuming this worked properly, repeat steps 1-6 on your production site.

OTHER TIPS

CiviCRM uses the Drupal CRM, so you are probably modifying Drupal Menu items or the location of the specific Menu Blocks.

Test by changing your default Theme to something like Garland or Seven

([sitename]/admin/appearance) 

and change the Region of your Navigation (or other) Menu Blocks

([sitename]/admin/structure/block)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top