Answers.Body: <p>As you discovered, the system expects to have 3 reserved profiles: "new_individual", "new_organization" and "new_household". If you accidentally deleted or renamed those profiles (machine "name" field not the user-facing title) I suggest naming them back, or else creating new ones with those names.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-10T16:44:23.043Z
Answers.Text: Excellent - I've been struggling for months to work out why one of my sites was manifesting this issue. Now I've finally fixed it. I guess the next question is how a reserved profile got deleted.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-19T02:45:41.083Z
Answers.LastActivityDate: 2017-05-19T02:45:41.083Z
Answers.UserDisplayName: Coleman
Body: <p>We recently upgraded to CiviCRM 4.7.19 on Drupal 7.52 and for some reason the New Organization button isn't appearing when searching for an unknown organization for a contact's current employer. I can add an organization via CiviCRM > Contacts > New Organisation but our backoffice staff liked being able to add from the person contact page. I've checked the console and there are no errors flagged and isn't a CSS thing as the element holding the button exists but just doesn't have the button markup e.g. instead of:</p>
  
  <pre><code>&lt;div class="crm-entityref-links"&gt; &lt;a class="crm-add-entity crm-hover-button" href="/civicrm/profile/create?reset=1&amp;amp;context=dialog&amp;amp;gid=5"&gt;&lt;i class="crm-i fa-building"&gt;&lt;/i&gt; New Organization&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>the page only has:</p>
  
  <pre><code>&lt;div class="crm-entityref-links"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I've checked permissions and as far as I can tell everything is set ok. Is there a setting I'm missing?</p>
  
  <p><a href="https://i.sstatic.net/5DEQh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5DEQh.png" alt="enter image description here"></a></p>
  
  <p><strong>Update</strong></p>
  
  <p>Looking at our l10n-js file I can see that the <code>contactCreate</code> object is not being populated:</p>
  
  <pre><code>CRM.config.entityRef = $.extend({}, {"contactCreate":[]...
  </code></pre>
  
  <p>Digging into the code I can see this is supposed to be created in Core/Resources.php (<a href="http://github.com/civicrm/civicrm-core/blob/d90703e148682e062df9dbdb491225af195f8a51/CRM/Core/Resources.php#L685" rel="nofollow noreferrer">line 685</a>):</p>
  
  <pre><code>'contactCreate' =&gt; CRM_Core_BAO_UFGroup::getCreateLinks()
  </code></pre>
  
  <p>Looking at CRM/Core/BAO/UFGroup.php I can see the <a href="https://github.com/civicrm/civicrm-core/blob/1f8e8d5a574f705bd128a507d98f804a557e05cb/CRM/Core/BAO/UFGroup.php#L3300" rel="nofollow noreferrer"><code>getCreateLinks()</code> function</a> calls </p>
  
  <pre><code>public static function getCreateLinks($profiles = '', $appendProfiles = array()) {
      // Default to contact profiles
      if (!$profiles) {
        $profiles = array('new_individual', 'new_organization', 'new_household');
      }
      $profiles = (array) $profiles;
      $toGet = array_merge($profiles, (array) $appendProfiles);
      $retrieved = civicrm_api3('uf_group', 'get', array(
        'name' =&gt; array('IN' =&gt; $toGet),
        'is_active' =&gt; 1,
      ));
  </code></pre>
  
  <p>Running a similar API call on our install:</p>
  
  <pre><code>$result = civicrm_api3('UFGroup', 'get', array(
    'sequential' =&gt; 1,
    'name' =&gt; array('IN' =&gt; array("new_individual", "new_organization")),
  ));
  </code></pre>
  
  <p>I get no results, the reason is because the name is actually <code>new_organization_5</code> not <code>new_organization</code> Still don't know how to fix</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-17T16:17:21.183Z
Comments.Text: On my copy (running the master branch) I can create a new organization from this widget (while logged in as an administrator).  I know that doesn't solve your problem but hopefully it's helpful!
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-17T20:31:03.960Z
Comments.Text: can see it working on http://dmaster.demo.civicrm.org/ as well .. still not sure why are install is missing this
Comments.UserDisplayName: mhawksey
Tags: <contacts><relationships>
Title: Enabling 'New Organisation' button for Current Employer field in View Contact
ThreadText: # Enabling 'New Organisation' button for Current Employer field in View Contact
  
  (Asked by: username_0 on 2017-05-17)
  
  We recently upgraded to CiviCRM 4.7.19 on Drupal 7.52 and for some reason the New Organization button isn't appearing when searching for an unknown organization for a contact's current employer. I can add an organization via CiviCRM > Contacts > New Organisation but our backoffice staff liked being able to add from the person contact page. I've checked the console and there are no errors flagged and isn't a CSS thing as the element holding the button exists but just doesn't have the button markup e.g. instead of:
  
  ```
  <div class="crm-entityref-links"> <a class="crm-add-entity crm-hover-button" href="/civicrm/profile/create?reset=1&amp;context=dialog&amp;gid=5"><i class="crm-i fa-building"></i> New Organization</a></div>
  
  ```
  
  the page only has:
  
  ```
  <div class="crm-entityref-links"></div>
  
  ```
  
  I've checked permissions and as far as I can tell everything is set ok. Is there a setting I'm missing?
  
  [![enter image description here](https://i.sstatic.net/5DEQh.png)](https://i.sstatic.net/5DEQh.png)
  
  **Update**
  
  Looking at our l10n-js file I can see that the `contactCreate` object is not being populated:
  
  ```
  CRM.config.entityRef = $.extend({}, {"contactCreate":[]...
  
  ```
  
  Digging into the code I can see this is supposed to be created in Core/Resources.php ([line 685](http://github.com/civicrm/civicrm-core/blob/d90703e148682e062df9dbdb491225af195f8a51/CRM/Core/Resources.php#L685)):
  
  ```
  'contactCreate' => CRM_Core_BAO_UFGroup::getCreateLinks()
  
  ```
  
  Looking at CRM/Core/BAO/UFGroup.php I can see the [`getCreateLinks()` function](https://github.com/civicrm/civicrm-core/blob/1f8e8d5a574f705bd128a507d98f804a557e05cb/CRM/Core/BAO/UFGroup.php#L3300) calls
  
  ```
  public static function getCreateLinks($profiles = '', $appendProfiles = array()) {
      // Default to contact profiles
      if (!$profiles) {
        $profiles = array('new_individual', 'new_organization', 'new_household');
      }
      $profiles = (array) $profiles;
      $toGet = array_merge($profiles, (array) $appendProfiles);
      $retrieved = civicrm_api3('uf_group', 'get', array(
        'name' => array('IN' => $toGet),
        'is_active' => 1,
      ));
  
  ```
  
  Running a similar API call on our install:
  
  ```
  $result = civicrm_api3('UFGroup', 'get', array(
    'sequential' => 1,
    'name' => array('IN' => array("new_individual", "new_organization")),
  ));
  
  ```
  
  I get no results, the reason is because the name is actually `new_organization_5` not `new_organization` Still don't know how to fix
  
  **Tags:** contacts, relationships
  
  > **Comments:**
  > **username_1**: On my copy (running the master branch) I can create a new organization from this widget (while logged in as an administrator).  I know that doesn't solve your problem but hopefully it's helpful!  
  > **username_0**: can see it working on http://dmaster.demo.civicrm.org/ as well .. still not sure why are install is missing this  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-05-19. Score: 2 | Accepted answer
  
  As you discovered, the system expects to have 3 reserved profiles: "new\_individual", "new\_organization" and "new\_household". If you accidentally deleted or renamed those profiles (machine "name" field not the user-facing title) I suggest naming them back, or else creating new ones with those names.
  
  > **Comments:**
  > **username_3**: Excellent - I've been struggling for months to work out why one of my sites was manifesting this issue. Now I've finally fixed it. I guess the next question is how a reserved profile got deleted.  
  
  ---
  
  