Answers.Body: <p><strong>The problem was not from the code</strong>. But that was in fact from imported data in the table <em>civicrm_relationship</em>. There were in the table some data left by a test (in the case_id column). My mistake.
  So the matter is solved.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-26T13:29:49.640Z
Answers.LastActivityDate: 2017-11-26T13:29:49.640Z
Answers.UserDisplayName: Ichi
Body: <p>In a Case, when I try to add a New Role, there is an Error warning.
  First I get the window to indicate <em>Relationship Type</em> and to <em>Assign To:</em>, then no role is added.</p>
  
  <p><em>Error
  API (EntitySetting, get) does not exist (join the API team and implement it!)</em></p>
  
  <p>Here's the ConfigAndLog :</p>
  
  <p>Thanks for help in the matter.</p>
  
  <pre><code>   $Fatal Error Details = array(3) {
    ["message"]=&gt;
    string(77) "API (EntitySetting, get) does not exist (join the API team and implement it!)"
    ["code"]=&gt;
    NULL
    ["exception"]=&gt;
    object(CiviCRM_API3_Exception)#608 (8) {
      ["extraParams":"CiviCRM_API3_Exception":private]=&gt;
      array(3) {
        ["is_error"]=&gt;
        int(1)
        ["error_message"]=&gt;
        string(77) "API (EntitySetting, get) does not exist (join the API team and implement it!)"
        ["error_code"]=&gt;
        string(9) "undefined"
      }
      ["message":protected]=&gt;
      string(77) "API (EntitySetting, get) does not exist (join the API team and implement it!)"
      ["string":"Exception":private]=&gt;
      string(0) ""
      ["code":protected]=&gt;
      int(0)
      ["file":protected]=&gt;
      string(71) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/api/api.php"
      ["line":protected]=&gt;
      int(45)
      ["trace":"Exception":private]=&gt;
      array(10) {
        [0]=&gt;
        array(4) {
          ["file"]=&gt;
          string(81) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php"
          ["line"]=&gt;
          int(3122)
          ["function"]=&gt;
          string(12) "civicrm_api3"
          ["args"]=&gt;
                  string(12) "civicrm_api3"
          ["args"]=&gt;
          array(3) {
            [0]=&gt;
            string(12) "relationship"
            [1]=&gt;
            string(6) "create"
            [2]=&gt;
            array(3) {
              ["id"]=&gt;
              string(4) "5467"
              ["is_active"]=&gt;
              int(0)
              ["end_date"]=&gt;
              string(3) "now"
            }
          }
        }
        [1]=&gt;
        array(6) {
          ["file"]=&gt;
          string(85) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php"
          ["line"]=&gt;
          int(242)
          ["function"]=&gt;
          string(11) "endCaseRole"
          ["class"]=&gt;
          string(17) "CRM_Case_BAO_Case"
          ["type"]=&gt;
          string(2) "::"
          ["args"]=&gt;
          array(4) {
            [0]=&gt;
            string(1) "1"
            [1]=&gt;
            string(1) "b"
            [2]=&gt;
            string(1) "2"
            [3]=&gt;
            string(1) "9"
          }
        }
        [2]=&gt;
        array(4) {
          ["function"]=&gt;
          string(12) "relationship"
          ["class"]=&gt;
          string(21) "CRM_Contact_Page_AJAX"
          ["type"]=&gt;
          string(2) "::"
          ["args"]=&gt;
          array(0) {
                 ["args"]=&gt;
          array(0) {
          }
        }
        [3]=&gt;
        array(4) {
          ["file"]=&gt;
          string(79) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php"
          ["line"]=&gt;
          int(275)
          ["function"]=&gt;
          string(14) "call_user_func"
          ["args"]=&gt;
          array(1) {
            [0]=&gt;
            array(2) {
              [0]=&gt;
              string(21) "CRM_Contact_Page_AJAX"
              [1]=&gt;
              string(12) "relationship"
            }
          }
        }
        [4]=&gt;
        array(6) {
          ["file"]=&gt;
          string(79) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php"
          ["line"]=&gt;
          int(84)
          ["function"]=&gt;
          string(7) "runItem"
          ["class"]=&gt;
          string(15) "CRM_Core_Invoke"
          ["type"]=&gt;
          string(2) "::"
          ["args"]=&gt;
          array(1) {
            [0]=&gt;
            array(12) {
              ["id"]=&gt;
              string(3) "215"
              ["domain_id"]=&gt;
              string(1) "1"
              ["path"]=&gt;
              string(21) "civicrm/ajax/relation"
              ["access_callback"]=&gt;
              array(2) {
                [0]=&gt;
                string(19) "CRM_Core_Permission"
                [1]=&gt;
                string(9) "checkMenu"
              }
  
                           string(9) "checkMenu"
              }
              ["access_arguments"]=&gt;
              array(2) {
                [0]=&gt;
                array(1) {
                  [0]=&gt;
                  string(14) "access CiviCRM"
                }
                [1]=&gt;
                string(3) "and"
              }
              ["page_callback"]=&gt;
              array(2) {
                [0]=&gt;
                string(21) "CRM_Contact_Page_AJAX"
                [1]=&gt;
                string(12) "relationship"
              }
              ["breadcrumb"]=&gt;
              array(1) {
                [0]=&gt;
                array(2) {
                  ["title"]=&gt;
                  string(7) "CiviCRM"
                  ["url"]=&gt;
                  string(16) "/civicrm?reset=1"
                }
              }
              ["is_ssl"]=&gt;
              string(1) "0"
              ["weight"]=&gt;
              string(1) "1"
              ["type"]=&gt;
              string(1) "1"
              ["page_type"]=&gt;
              string(1) "3"
              ["page_arguments"]=&gt;
              bool(false)
            }
          }
        }
        [5]=&gt;
        array(6) {
          ["file"]=&gt;
          string(79) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php"
          ["line"]=&gt;
          int(52)
          ["function"]=&gt;
          string(7) "_invoke"
          ["class"]=&gt;
          string(15) "CRM_Core_Invoke"
          ["class"]=&gt;
          string(15) "CRM_Core_Invoke"
          ["type"]=&gt;
          string(2) "::"
          ["args"]=&gt;
          array(1) {
            [0]=&gt;
            array(3) {
              [0]=&gt;
              string(7) "civicrm"
              [1]=&gt;
              string(4) "ajax"
              [2]=&gt;
              string(8) "relation"
            }
          }
        }
        [6]=&gt;
        array(6) {
          ["file"]=&gt;
          string(81) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/drupal/civicrm.module"
          ["line"]=&gt;
          int(448)
          ["function"]=&gt;
          string(6) "invoke"
          ["class"]=&gt;
          string(15) "CRM_Core_Invoke"
          ["type"]=&gt;
          string(2) "::"
          ["args"]=&gt;
          array(1) {
            [0]=&gt;
            &amp;array(3) {
              [0]=&gt;
              string(7) "civicrm"
              [1]=&gt;
              string(4) "ajax"
              [2]=&gt;
              string(8) "relation"
            }
          }
        }
        [7]=&gt;
        array(2) {
          ["function"]=&gt;
          string(14) "civicrm_invoke"
          ["args"]=&gt;
          array(2) {
            [0]=&gt;
            &amp;string(4) "ajax"
            [1]=&gt;
            &amp;string(8) "relation"
           [1]=&gt;
            &amp;string(8) "relation"
          }
        }
        [8]=&gt;
        array(4) {
          ["file"]=&gt;
          string(51) "/var/data/sites/photo/public_html/includes/menu.inc"
          ["line"]=&gt;
          int(527)
          ["function"]=&gt;
          string(20) "call_user_func_array"
          ["args"]=&gt;
          array(2) {
            [0]=&gt;
            &amp;string(14) "civicrm_invoke"
            [1]=&gt;
            &amp;array(2) {
              [0]=&gt;
              string(4) "ajax"
              [1]=&gt;
              string(8) "relation"
            }
          }
        }
        [9]=&gt;
        array(4) {
          ["file"]=&gt;
          string(43) "/var/data/sites/photo/public_html/index.php"
          ["line"]=&gt;
          int(21)
          ["function"]=&gt;
          string(27) "menu_execute_active_handler"
          ["args"]=&gt;
          array(0) {
          }
        }
      }
      ["previous":"Exception":private]=&gt;
      NULL
    }
  }
  
  
  Nov 26 13:11:45  [info] $backTrace = #0 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(456): CRM_Core_Error::backtrace("backTrace",$
  #1 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))
  #2 /var/data/sites/photo/public_html/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
  #3 [internal function](): civicrm_invoke("ajax", "relation")
  #4 /var/data/sites/photo/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
  #5 /var/data/sites/photo/public_html/index.php(21): menu_execute_active_handler()
  #6 {main}
  </code></pre>
  
Tags: <civicase>
Title: Cannot add a new role to any case
ThreadText: # Cannot add a new role to any case
  
  (Asked by: username_0 on 2017-11-26)
  
  In a Case, when I try to add a New Role, there is an Error warning.
  First I get the window to indicate Relationship Type and to Assign To:, then no role is added.
  Error
  API (EntitySetting, get) does not exist (join the API team and implement it!)
  Here's the ConfigAndLog :
  Thanks for help in the matter.
     $Fatal Error Details = array(3) {
    ["message"]=>
    string(77) "API (EntitySetting, get) does not exist (join the API team and implement it!)"
    ["code"]=>
    NULL
    ["exception"]=>
    object(CiviCRM_API3_Exception)#608 (8) {
      ["extraParams":"CiviCRM_API3_Exception":private]=>
      array(3) {
        ["is_error"]=>
        int(1)
        ["error_message"]=>
        string(77) "API (EntitySetting, get) does not exist (join the API team and implement it!)"
        ["error_code"]=>
        string(9) "undefined"
      }
      ["message":protected]=>
      string(77) "API (EntitySetting, get) does not exist (join the API team and implement it!)"
      ["string":"Exception":private]=>
      string(0) ""
      ["code":protected]=>
      int(0)
      ["file":protected]=>
      string(71) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/api/api.php"
      ["line":protected]=>
      int(45)
      ["trace":"Exception":private]=>
      array(10) {
        [0]=>
        array(4) {
          ["file"]=>
          string(81) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php"
          ["line"]=>
          int(3122)
          ["function"]=>
          string(12) "civicrm_api3"
          ["args"]=>
                  string(12) "civicrm_api3"
          ["args"]=>
          array(3) {
            [0]=>
            string(12) "relationship"
            [1]=>
            string(6) "create"
            [2]=>
            array(3) {
              ["id"]=>
              string(4) "5467"
              ["is_active"]=>
              int(0)
              ["end_date"]=>
              string(3) "now"
            }
          }
        }
        [1]=>
        array(6) {
          ["file"]=>
          string(85) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php"
          ["line"]=>
          int(242)
          ["function"]=>
          string(11) "endCaseRole"
          ["class"]=>
          string(17) "CRM_Case_BAO_Case"
          ["type"]=>
          string(2) "::"
          ["args"]=>
          array(4) {
            [0]=>
            string(1) "1"
            [1]=>
            string(1) "b"
            [2]=>
            string(1) "2"
            [3]=>
            string(1) "9"
          }
        }
        [2]=>
        array(4) {
          ["function"]=>
          string(12) "relationship"
          ["class"]=>
          string(21) "CRM_Contact_Page_AJAX"
          ["type"]=>
          string(2) "::"
          ["args"]=>
          array(0) {
                 ["args"]=>
          array(0) {
          }
        }
        [3]=>
        array(4) {
          ["file"]=>
          string(79) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php"
          ["line"]=>
          int(275)
          ["function"]=>
          string(14) "call_user_func"
          ["args"]=>
          array(1) {
            [0]=>
            array(2) {
              [0]=>
              string(21) "CRM_Contact_Page_AJAX"
              [1]=>
              string(12) "relationship"
            }
          }
        }
        [4]=>
        array(6) {
          ["file"]=>
          string(79) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php"
          ["line"]=>
          int(84)
          ["function"]=>
          string(7) "runItem"
          ["class"]=>
          string(15) "CRM_Core_Invoke"
          ["type"]=>
          string(2) "::"
          ["args"]=>
          array(1) {
            [0]=>
            array(12) {
              ["id"]=>
              string(3) "215"
              ["domain_id"]=>
              string(1) "1"
              ["path"]=>
              string(21) "civicrm/ajax/relation"
              ["access_callback"]=>
              array(2) {
                [0]=>
                string(19) "CRM_Core_Permission"
                [1]=>
                string(9) "checkMenu"
              }
  
                           string(9) "checkMenu"
              }
              ["access_arguments"]=>
              array(2) {
                [0]=>
                array(1) {
                  [0]=>
                  string(14) "access CiviCRM"
                }
                [1]=>
                string(3) "and"
              }
              ["page_callback"]=>
              array(2) {
                [0]=>
                string(21) "CRM_Contact_Page_AJAX"
                [1]=>
                string(12) "relationship"
              }
              ["breadcrumb"]=>
              array(1) {
                [0]=>
                array(2) {
                  ["title"]=>
                  string(7) "CiviCRM"
                  ["url"]=>
                  string(16) "/civicrm?reset=1"
                }
              }
              ["is_ssl"]=>
              string(1) "0"
              ["weight"]=>
              string(1) "1"
              ["type"]=>
              string(1) "1"
              ["page_type"]=>
              string(1) "3"
              ["page_arguments"]=>
              bool(false)
            }
          }
        }
        [5]=>
        array(6) {
          ["file"]=>
          string(79) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php"
          ["line"]=>
          int(52)
          ["function"]=>
          string(7) "_invoke"
          ["class"]=>
          string(15) "CRM_Core_Invoke"
          ["class"]=>
          string(15) "CRM_Core_Invoke"
          ["type"]=>
          string(2) "::"
          ["args"]=>
          array(1) {
            [0]=>
            array(3) {
              [0]=>
              string(7) "civicrm"
              [1]=>
              string(4) "ajax"
              [2]=>
              string(8) "relation"
            }
          }
        }
        [6]=>
        array(6) {
          ["file"]=>
          string(81) "/var/data/sites/photo/public_html/sites/all/modules/civicrm/drupal/civicrm.module"
          ["line"]=>
          int(448)
          ["function"]=>
          string(6) "invoke"
          ["class"]=>
          string(15) "CRM_Core_Invoke"
          ["type"]=>
          string(2) "::"
          ["args"]=>
          array(1) {
            [0]=>
            &array(3) {
              [0]=>
              string(7) "civicrm"
              [1]=>
              string(4) "ajax"
              [2]=>
              string(8) "relation"
            }
          }
        }
        [7]=>
        array(2) {
          ["function"]=>
          string(14) "civicrm_invoke"
          ["args"]=>
          array(2) {
            [0]=>
            &string(4) "ajax"
            [1]=>
            &string(8) "relation"
           [1]=>
            &string(8) "relation"
          }
        }
        [8]=>
        array(4) {
          ["file"]=>
          string(51) "/var/data/sites/photo/public_html/includes/menu.inc"
          ["line"]=>
          int(527)
          ["function"]=>
          string(20) "call_user_func_array"
          ["args"]=>
          array(2) {
            [0]=>
            &string(14) "civicrm_invoke"
            [1]=>
            &array(2) {
              [0]=>
              string(4) "ajax"
              [1]=>
              string(8) "relation"
            }
          }
        }
        [9]=>
        array(4) {
          ["file"]=>
          string(43) "/var/data/sites/photo/public_html/index.php"
          ["line"]=>
          int(21)
          ["function"]=>
          string(27) "menu_execute_active_handler"
          ["args"]=>
          array(0) {
          }
        }
      }
      ["previous":"Exception":private]=>
      NULL
    }
  }
  
  
  Nov 26 13:11:45  [info] $backTrace = #0 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(456): CRM_Core_Error::backtrace("backTrace",$
  #1 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))
  #2 /var/data/sites/photo/public_html/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
  #3 [internal function](): civicrm_invoke("ajax", "relation")
  #4 /var/data/sites/photo/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
  #5 /var/data/sites/photo/public_html/index.php(21): menu_execute_active_handler()
  #6 {main}
  
  **Tags:** civicase
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-11-26. Score: 2 | Accepted answer
  
  **The problem was not from the code**. But that was in fact from imported data in the table *civicrm\_relationship*. There were in the table some data left by a test (in the case\_id column). My mistake.
  So the matter is solved.
  
  
  ---
  
  