CRM-16095 Civi warning when editing Drupal content

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.7, 4.5.8
    • Fix Version/s: 4.6
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      When editing a Drupal content, there is sometime –not immediately– an error warning probably issued by CiviCRM. I am not very sure because the warning is not very informative, but it seems to me that it is coming from CiviCRM.
      This happens a lot –althought not immediately– after using in this content the contact field provided by the module : CiviCRM Contact Reference Field
      There is nothing about that in the Drupal logs.
      Also I have the same issue on the Civi 4.6 beta3.

        Attachments

          Activity

          [CRM-16095] Civi warning when editing Drupal content
          Coleman Watts added a comment -

          Can you please provide more details:

          • What happens when you disable that module? Do the errors go away?
          • Can you enable debug and backtrace to get more info?
          • Can you provide steps to reliably reproduce?
          FM Andrimont added a comment -
          • What happens when you disable that module? Do the errors go away?
            It is difficult to disable the module CiviCRM Contact Reference Field as it is used by several fields in several content. But if I remove the field > then the trouble is gone and I can edit the drupal content.
          • Can you enable debug and backtrace to get more info?
            I install Devel but no I cannot see any information on the warning page. Only :
            Page execution time was 1161.33 ms. Memory used at: devel_boot()=9.08 MB, devel_shutdown()=82.72 MB, PHP peak=84.5 MB.
          • Can you provide steps to reliably reproduce?
            As it is not immediate [at first everything works when using a field that reference a CiviCRM contact], I don't know yet what makes the bug happen.
          Coleman Watts added a comment -

          In CiviCRM menu go to Administer->System Settings->Debugging and Error Handling
          Please enable the debug mode and the "display backtrace".
          Then try triggering the bug again and we can see if the error message is more helpful.

          FM Andrimont added a comment -

          Thank you for the advice, so I enabled the backtrace.
          That gave this :

          #0 /home/site/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(380): CRM_Core_Error::backtrace()
          #1 /home/site/public_html/sites/all/modules/civicrm/CRM/Utils/Type.php(347): CRM_Core_Error::fatal("One of parameters (value: ) is not of the type Integer")
          #2 /home/site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1183): CRM_Utils_Type::validate(NULL, "Integer")
          #3 /home/site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1102): CRM_Core_DAO::composeQuery("\nSELECT sort_name\nFROM civicrm_contact\nWHERE id = %1", (Array:1), TRUE)
          #4 /home/site/public_html/sites/all/modules/civicrm/drupal/modules/civicrm_contact_ref/civicrm_contact_ref.module(417): CRM_Core_DAO::executeQuery("\nSELECT sort_name\nFROM civicrm_contact\nWHERE id = %1", (Array:1))
          #5 /home/site/public_html/sites/all/modules/civicrm/drupal/modules/civicrm_contact_ref/civicrm_contact_ref.module(173): _civicrm_contact_ref_titles(NULL, "sort_name")
          #6 /home/site/public_html/modules/field/field.form.inc(224): civicrm_contact_ref_field_widget_form((Array:20), (Array:17), (Array:16), (Array:14), "und", (Array:13), 0, (Array:12))
          #7 /home/site/public_html/modules/field/field.form.inc(89): field_multiple_value_form((Array:16), (Array:14), "und", (Array:13), (Array:20), (Array:17))
          #8 /home/site/public_html/modules/field/field.attach.inc(209): field_default_form("node", Object(stdClass), (Array:16), (Array:14), "und", (Array:13), (Array:20), (Array:17))
          #9 /home/site/public_html/modules/field/field.attach.inc(385): _field_invoke("form", "node", Object(stdClass), (Array:20), (Array:17), (Array:2))
          #10 /home/site/public_html/modules/field/field.attach.inc(574): _field_invoke_default("form", "node", Object(stdClass), (Array:20), (Array:17), (Array:1))
          #11 /home/site/public_html/modules/node/node.pages.inc(326): field_attach_form("node", Object(stdClass), (Array:20), (Array:17), "fr")
          #12 [internal function](): node_form((Array:0), (Array:17), Object(stdClass))
          #13 /home/site/public_html/includes/form.inc(841): call_user_func_array("node_form", (Array:3))
          #14 /home/site/public_html/includes/form.inc(350): drupal_retrieve_form("production_node_form", (Array:17))
          #15 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/plugins/contexts/node_edit_form.inc(70): drupal_build_form("production_node_form", (Array:17))
          #16 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/includes/context.inc(607): ctools_context_create_node_edit_form(FALSE, Object(stdClass), FALSE, (Array:16))
          #17 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/plugins/arguments/node_edit.inc(36): ctools_context_create("node_edit_form", Object(stdClass))
          #18 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/includes/context.inc(803): ctools_node_edit_context(Object(stdClass), (Array:5), FALSE)
          #19 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/includes/context.inc(859): ctools_context_get_context_from_argument((Array:5), Object(stdClass))
          #20 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/includes/context-task-handler.inc(333): ctools_context_get_context_from_arguments((Array:1), (Array:0), (Array:1))
          #21 /home/site/public_html/profiles/openatrium/modules/contrib/ctools/page_manager/plugins/tasks/node_edit.inc(92): ctools_context_handler_get_task_contexts((Array:19), "", (Array:1))
          #22 [internal function](): page_manager_node_edit(Object(stdClass))
          #23 /home/site/public_html/sites/all/modules/contrib/entity_translation/entity_translation.module(701): call_user_func_array("page_manager_node_edit", (Array:1))
          #24 /home/site/public_html/sites/all/modules/contrib/entity_translation/entity_translation.module(546): _entity_translation_callback("page_manager_node_edit", (Array:1), (Array:11))
          #25 [internal function](): entity_translation_edit_page("node", Object(stdClass), FALSE, (Array:11), Object(stdClass))
          #26 /home/site/public_html/includes/menu.inc(517): call_user_func_array("entity_translation_edit_page", (Array:5))
          #27 /home/site/public_html/index.php(21): menu_execute_active_handler()
          #28

          {main}
          Coleman Watts added a comment -
          FM Andrimont added a comment -

          Thank you very much Coleman,

          I test the fix in the 4.5.8 with affected Drupal content, and it works now. Perfect.

            People

            • Assignee:
              Coleman Watts
              Reporter:
              FM Andrimont

              Dates

              • Created:
                Updated:
                Resolved: