CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Post Upgrade issue with Navigation Menu
Pages: [1]

Author Topic: Post Upgrade issue with Navigation Menu  (Read 751 times)

bcaldwell

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
    • Pushing7
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
Post Upgrade issue with Navigation Menu
October 21, 2014, 10:43:54 am
I'm working my way through a Drupal upgrade from 4.3.5 to 4.5.2 and have a very strange issue happening with the navigation menu.

It seems like all of the menu links have had special characters in query strings replaced with underscores. For example, when I click Search->Find contacts in the CiviCRM admin menu, I get:

.../civicrm/contact/search_reset_1

instead of

.../civicrm/contact/search?reset=1

Another example:

.../civicrm/admin/price_reset_1_action_add

which should be:

.../civicrm/admin/price?reset=1&action=add

This holds true for nearly every menu item with the exception of items related to SMS under "mailings" and a "manage discounts" option under memberships.

When I look at the menu items from the Navigation Menu admin page/editing interface, the URL is correct. I've tried clearing every cache I can think of and have removed all of the custom extensions and templates I had working on the previous version, but no luck yet.

Any suggestions as to what might be happening here? Not sure if it's relevant, but the dev server I'm working on happens to be running nginx.

bcaldwell

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
    • Pushing7
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
Re: Post Upgrade issue with Navigation Menu
October 22, 2014, 08:21:07 am
Did some more debugging on this today and found that the url being retrieved from the database was incorrect. Somehow the question mark was being replaced with an ampersand.

The following workaround has helped me solve this for now, but I'm sure that this isn't the right fix.

Changes below were made in CRM/Core/BAO/Navigation.php to the getMenuName function.

Code: [Select]
    $url        = $value['attributes']['url'];
    $url        = preg_replace('/&/', '?', $url, 1); // Workaround to address issue with navigation menu links not working

friendswoodtech

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.56
  • PHP version: 5.3.6
Re: Post Upgrade issue with Navigation Menu
November 11, 2014, 02:43:20 pm
I am seeing the exact same issue on one of my sites, running Drupal 7.32 and Civicrm 4.5.3.  I upgraded 10+ other sites today with no issues and this one.... Well it was a headache from the get go.  Had database errors all the way through that I had to manually complete, but the upgrade script finally completed.  I see no errors in ConfigandLog and the only issues I am seeing now is the menu.  I'll try to troubleshoot more tonight.

friendswoodtech

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.56
  • PHP version: 5.3.6
Re: Post Upgrade issue with Navigation Menu
November 12, 2014, 10:59:36 am
I'm not real sure what caused all the issues that I had - but I was wrong in stating that everything else was working.  I use civicase on this site and was upgrading from 4.3.7 to 4.5.3.  While it appeared that my db upgrade functioned properly, it really didn't.  After posting the above, I realize that civicase was not working.  Did a little digging and noticed the changes to civicase in the db.  Ended up manually upgrading the db using the incremental files.  Painful but worth it.  Once completed, all worked, including the menus.

bcaldwell

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
    • Pushing7
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
Re: Post Upgrade issue with Navigation Menu
December 05, 2014, 04:30:34 pm
@friendswoodtech, can you say more about what you did to manually upgrade the database? I upgraded to 4.5.4 today and am having the same issue, but the hack I mentioned above no longer does the trick.

Is this an issue of needing to manually rebuild the menu table?

I also noticed that this happens on most (but not all) of my reports. The exception is customized reports. Seems that if I update a report to use something other than the default values, the menu item magically fixes itself.

friendswoodtech

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.56
  • PHP version: 5.3.6
Re: Post Upgrade issue with Navigation Menu
December 08, 2014, 02:45:53 am
There may be an easier way to do it, but this is what I did.

First, verify what version of CiviCRM your db has been updated to by checking the version in civicrm_domain.  This tells you where the update failed, so what's been completed is the version prior to that.

Then you're going to use a combination of files from the civicrm installation (/sites/all/modules/civicrm/crm/upgrade/incremental.  Depending on your findings, you may need to modify php/fourthree.php, php/fourfour.php and php/fourfive.php and then several of the .tpl files in the sql folder, beginning with 4.3.6-mysql.tpl.

These files contain all of the changes that are made during the upgrade process.  It is VERY painful - it could take hours depending on where your upgrade failed, but short of stepping through each change line by line, I know of no other way to correct the issue.

Change your version field back to 4.3.5 in the db and run the upgrade script - when it errors, copy and paste the output into notepad and read the error - this will tell you what failed and why.  Then go find that section of the appropriate file (either the .tpl or .php).  You should be able to safely modify the file by deleting the changes above these lines as they have been completed.  Correct the issues identified manually in the database (or try to run the sql manually in myphpadmin), upload the modified file back to your site, set your version back to the last version completed successfully in civicrm_domain and rerun your upgrade script.  If it errors our, check your output and do it all over again.

For me, I found most of my issues were in the 4.5.1 upgrade. 

There might be an easier way to accomplish this, but this worked for me.

bcaldwell

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
    • Pushing7
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.31
  • PHP version: 5.3.10
Re: Post Upgrade issue with Navigation Menu
December 08, 2014, 10:21:43 am
Thanks much! It definitely does sound painful -- I had to do something like this in a few places when I upgraded to 4.3.2. Makes me wonder if a structure compare from a clean install would be helpful in figuring out where the problems are.

Will give it a shot and post back the results.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Post Upgrade issue with Navigation Menu

This forum was archived on 2017-11-26.