Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-688

Error in viewing profiles in certain groups

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have created about 8 different types of groups. Two initial a week back and 6 later. I dont know what i have in past week with the initial 2 groups but the seem to work fine, while the new groups gives some error message when trying to see civicrm/profile?reset=1&gid=N (where N=3,4,..8) N=1,2 works fine.. The message i get are:

      --------------------------------------------------------------------------------------------------------------------
      warning: Invalid argument supplied for foreach() in /var/www/html/den/modules/civicrm/CRM/Profile/Page/Listings.php on line 100.

      warning: Invalid argument supplied for foreach() in /var/www/html/den/modules/civicrm/CRM/Contact/BAO/Contact.php on line 1466.

      warning: Invalid argument supplied for foreach() in /var/www/html/den/modules/civicrm/CRM/Profile/Selector/Listings.php on line 210.

      warning: Invalid argument supplied for foreach() in /var/www/html/den/modules/civicrm/CRM/Profile/Selector/Listings.php on line 298.

      warning: Cannot modify header information - headers already sent by (output started at /var/www/html/den/includes/common.inc:384) in /var/www/html/den/modules/civicrm/CRM/Utils/System.php on line 392.
      ----------------------------------------------------------------------------------------------------------------

      But if i go through usual channels of links which exists on website, all groups work fine, and i can see all members of group=3 through civicrm/group/search?reset=1&force=1&context=smog&gid=3 but not through civicrm/profile?reset=1&gid=3 where as for gid=1 both works fine..

      I gues this is reason why when i am trying to import profiles in two groups, one in 1 or 2 and the other in 3-8 it gives error..

      ----------------------------------------------------------------------------------------------------------------------------------
      Sorry. A non-recoverable error has occurred.

      Database Error Code: Cannot add or update a child row: a foreign key constraint fails, 1216

      Return to CiviCRM menu.

      error

      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -3
      [message] => DB Error: constraint violation
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_subscription_history (contact_id , group_id , date , method , status , tracking ) VALUES ( 0 , 1 , 20060110130916 , 'Admin' , 'Added' , NULL ) [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]
      [type] => db_error
      [user_info] => INSERT INTO civicrm_subscription_history (contact_id , group_id , date , method , status , tracking ) VALUES ( 0 , 1 , 20060110130916 , 'Admin' , 'Added' , NULL ) [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]
      [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_subscription_history (contact_id , group_id , date , method , status , tracking ) VALUES ( 0 , 1 , 20060110130916 , 'Admin' , 'Added' , NULL ) [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]"]
      )
      ------------------------------------------------------------------------------------------------------------------------

      whereas if i add the same contacts in only one group, it works fine..

      --rafi

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              chaos21in Rafi Ahmad
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: