title: Call to undefined function entityreference_get_behavior_handlers() in \sites\all\modules\community\entityreference\entityreference.install on line 46
body: <p>I'm new to drupal, Here I got one project to work. In that I'm getting one error that.</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function
    entityreference_get_behavior_handlers() in
    \sites\all\modules\community\entityreference\entityreference.install
    on line 46</p>
  </blockquote>
  
  <p>And I checked that file.</p>
  
  <pre><code>foreach (entityreference_get_behavior_handlers($field) as $handler) {
        $handler-&gt;schema_alter($schema, $field);
  }
  </code></pre>
  
  <p>these are the lines and especially error is coming from the following function call.</p>
  
  <pre><code>entityreference_get_behavior_handlers($field)
  </code></pre>
  
  <p>I tried to debug also. Here is the results produced when I printed the variable.</p>
  
  <pre><code>print_r($field);
  
  Array
  (
      [translatable] =&gt; 0
      [entity_types] =&gt; Array
          (
          )
  
      [settings] =&gt; Array
          (
              [target_type] =&gt; user
              [handler] =&gt; base
              [handler_settings] =&gt; Array
                  (
                      [target_bundles] =&gt; Array
                          (
                          )
  
                      [sort] =&gt; Array
                          (
                              [type] =&gt; none
                          )
  
                      [referenceable_roles] =&gt; Array
                          (
                              [5] =&gt; 5
                              [2] =&gt; 0
                              [3] =&gt; 0
                              [4] =&gt; 0
                              [6] =&gt; 0
                              [7] =&gt; 0
                              [8] =&gt; 0
                              [9] =&gt; 0
                              [10] =&gt; 0
                          )
  
                      [referenceable_status] =&gt; Array
                          (
                              [active] =&gt; active
                              [blocked] =&gt; 0
                          )
  
                      [behaviors] =&gt; Array
                          (
                              [views-select-list] =&gt; Array
                                  (
                                      [status] =&gt; 0
                                  )
  
                          )
  
                  )
  
          )
  
      [storage] =&gt; Array
          (
              [type] =&gt; field_sql_storage
              [settings] =&gt; Array
                  (
                  )
  
              [module] =&gt; field_sql_storage
              [active] =&gt; 1
              [details] =&gt; Array
                  (
                      [sql] =&gt; Array
                          (
                              [FIELD_LOAD_CURRENT] =&gt; Array
                                  (
                                      [field_data_field_web_designer] =&gt; Array
                                          (
                                              [target_id] =&gt; field_web_designer_target_id
                                          )
  
                                  )
  
                              [FIELD_LOAD_REVISION] =&gt; Array
                                  (
                                      [field_revision_field_web_designer] =&gt; Array
                                          (
                                              [target_id] =&gt; field_web_designer_target_id
                                          )
  
                                  )
  
                          )
  
                  )
  
          )
  
      [foreign keys] =&gt; Array
          (
              [node] =&gt; Array
                  (
                      [table] =&gt; node
                      [columns] =&gt; Array
                          (
                              [target_id] =&gt; nid
                          )
  
                  )
  
          )
  
      [indexes] =&gt; Array
          (
              [target_id] =&gt; Array
                  (
                      [0] =&gt; target_id
                  )
  
          )
  
      [id] =&gt; 14
      [field_permissions] =&gt; Array
          (
              [type] =&gt; 0
          )
  
      [field_name] =&gt; field_web_designer
      [type] =&gt; entityreference
      [module] =&gt; entityreference
      [active] =&gt; 0
      [locked] =&gt; 0
      [cardinality] =&gt; -1
      [deleted] =&gt; 0
  )
  </code></pre>
  
  <p>I believe this will be more detail to help me.</p>
  
  <p>Thanks in advance,</p>
  
  <p><strong>Vivek</strong></p>