3

On CiviCRM 4.7.22 Drupal 7, I'm missing the "New Organization" button under Current Employer. I can't seem to find figure out whether this is a settings problem or not. A previous version of CiviCRM had it.

And I haven't made any changes to the contact types or relationships.enter image description here

I also checked the reserved profiles. No changes on "new_organization".

  • I'm on 4.7.21 and it isn't there. But if you go to dmaster.demo.civicrm.org it's there on 4.7.25. Must have been a bug that's been fixed I guess. – Andy Clark Aug 30 '17 at 21:00
  • Strange thing is that on a clean 4.7.22 install, the "New Organization" button shows. – Kristine Aug 30 '17 at 21:17
  • Also, just updated to 4.7.23 and no changes. – Kristine Aug 31 '17 at 18:48
3

Ran into this upgrading to 4.7.22

For some reason (which I have not investigated) the reserved profiles for New Individual, New Organization, etc got their profile ID appended to their "name".

If you query the UFGroup entity in the API explorer like this:

$result = civicrm_api3('UFGroup', 'get', array(
  'sequential' => 1,
  'title' => "New Organization",
));

You should have a result like:

{
    "id": "5",
    "is_active": "1",
    "group_type": "Organization,Contact",
    "title": "New Organization",
    "add_captcha": "0",
    "is_map": "0",
    "is_edit_link": "0",
    "is_uf_link": "0",
    "is_update_dupe": "0",
    "is_cms_user": "0",
    "is_reserved": "1",
    "name": "new_organization_5", // note the appended ID, 'new_organization' should be the value here
    "is_proximity_search": "0",
    "is_error": 0
}

Digging here, here and here found that when the method to get the profile links is called with no params, the profiles names are hardcoded to the default 'new_individual', 'new_organization', 'new_household'

To fix it you'll need to revert back the profile "name" either via the API explorer:

$result = civicrm_api3('UFGroup', 'create', array(
    'sequential' => 1,
    'id' => 5,
    "is_active": "1",
    "group_type": "Organization,Contact",
    "title": "New Organization",
    "add_captcha": "0",
    "is_map": "0",
    "is_edit_link": "0",
    "is_uf_link": "0",
    "is_update_dupe": "0",
    "is_cms_user": "0",
    "is_reserved": "1",
    "name": "new_organization",
    "is_proximity_search": "0",
));

Or if you have access to and you feel more comfortable, querying the database directly:

update civicrm_uf_group set name="new_organization" where id=5;

Hope that helps.

  • Thank you, thank you! This was perfect. I used phpyadmin to query the statement you gave me, then clear cache in CiviCRM. – Kristine Sep 1 '17 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.