1

I am new to CiviCRM, and we are just setting up our first pages in preparation for our annual fundraising event.

I've created a Contribution page Contribution that gives the following error when trying to process the contribution (after the confirmation page, if that option is activated): Sorry but we are not able to provide this at the moment. DB Error: no such field

I've tried a number of settings and have discovered that the error shows up when the setting for "email receipt" is checked OR when "Allow contributions on behalf of an organization" is checked (with or without an emailed receipt). With neither of these options checked, it works fine. But, we want these options!

The Debug feedback is below. I have dabbled in programming, but my experience is limited and this is more than I can figure out. Can anyone help me sort this out!


Database Error Code: Unknown column 'civicrm_value_roles_2.roles_1' in 'field list', 1054 Additional Details:

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

[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => 

SELECT    contact_a.id                                                                    AS contact_id,
          contact_a.contact_type                                                          AS `contact_type`,
          contact_a.contact_sub_type                                                      AS `contact_sub_type`,
          contact_a.sort_name                                                             AS `sort_name`,
          contact_a.display_name                                                          AS `display_name`,
          contact_a.do_not_email                                                          AS `do_not_email`,
          contact_a.do_not_phone                                                          AS `do_not_phone`,
          contact_a.do_not_mail                                                           AS `do_not_mail`,
          contact_a.do_not_sms                                                            AS `do_not_sms`,
          contact_a.do_not_trade                                                          AS `do_not_trade`,
          contact_a.is_opt_out                                                            AS `is_opt_out`,
          contact_a.legal_identifier                                                      AS `legal_identifier`,
          contact_a.external_identifier                                                   AS `external_identifier`,
          contact_a.nick_name                                                             AS `nick_name`,
          contact_a.image_url                                                             AS `image_url`,
          contact_a.preferred_communication_method                                        AS `preferred_communication_method`,
          contact_a.preferred_language                                                    AS `preferred_language`,
          contact_a.preferred_mail_format                                                 AS `preferred_mail_format`,
          contact_a.hash                                                                  AS `hash`,
          contact_a.source                                                                AS `contact_source`,
          contact_a.first_name                                                            AS `first_name`,
          contact_a.middle_name                                                           AS `middle_name`,
          contact_a.last_name                                                             AS `last_name`,
          contact_a.prefix_id                                                             AS `prefix_id`,
          contact_a.suffix_id                                                             AS `suffix_id`,
          contact_a.formal_title                                                          AS `formal_title`,
          contact_a.communication_style_id                                                AS `communication_style_id`,
          contact_a.job_title                                                             AS `job_title`,
          contact_a.gender_id                                                             AS `gender_id`,
          contact_a.birth_date                                                            AS `birth_date`,
          contact_a.is_deceased                                                           AS `is_deceased`,
          contact_a.deceased_date                                                         AS `deceased_date`,
          contact_a.user_unique_id                                                        AS `user_unique_id`,
          contact_a.employer_id                                                           AS `current_employer_id`,
          contact_a.is_deleted                                                            AS `contact_is_deleted`,
          contact_a.created_date                                                          AS `created_date`,
          contact_a.modified_date                                                         AS `modified_date`,
          contact_a.addressee_id                                                          AS addressee_id,
          contact_a.addressee_display                                                     AS addressee_display,
          contact_a.addressee_custom                                                      AS addressee_custom,
          contact_a.email_greeting_id                                                     AS email_greeting_id,
          contact_a.email_greeting_display                                                AS email_greeting_display,
          contact_a.email_greeting_custom                                                 AS email_greeting_custom,
          contact_a.postal_greeting_id                                                    AS postal_greeting_id,
          contact_a.postal_greeting_display                                               AS postal_greeting_display,
          contact_a.postal_greeting_custom                                                AS postal_greeting_custom,
          IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) AS current_employer,
          civicrm_address.id                                                              AS address_id,
          civicrm_location_type.id                                                        AS location_type_id,
          civicrm_location_type.name                                                      AS `location_type`,
          civicrm_address.street_address                                                  AS `street_address`,
          civicrm_address.street_number                                                   AS `street_number`,
          civicrm_address.street_number_suffix                                            AS `street_number_suffix`,
          civicrm_address.street_name                                                     AS `street_name`,
          civicrm_address.street_unit                                                     AS `street_unit`,
          civicrm_address.supplemental_address_1                                          AS `supplemental_address_1`,
          civicrm_address.supplemental_address_2                                          AS `supplemental_address_2`,
          civicrm_address.city                                                            AS `city`,
          civicrm_address.postal_code_suffix                                              AS `postal_code_suffix`,
          civicrm_address.postal_code                                                     AS `postal_code`,
          civicrm_address.geo_code_1                                                      AS `geo_code_1`,
          civicrm_address.geo_code_2                                                      AS `geo_code_2`,
          civicrm_address.name                                                            AS `address_name`,
          civicrm_address.master_id                                                       AS `master_id`,
          civicrm_address.county_id                                                       AS county_id,
          civicrm_address.state_province_id                                               AS state_province_id,
          civicrm_address.country_id                                                      AS country_id,
          civicrm_phone.id                                                                AS phone_id,
          civicrm_phone.phone_type_id                                                     AS phone_type_id,
          civicrm_phone.phone                                                             AS `phone`,
          civicrm_phone.phone_ext                                                         AS `phone_ext`,
          civicrm_email.id                                                                AS email_id,
          civicrm_email.email                                                             AS `email`,
          civicrm_email.on_hold                                                           AS `on_hold`,
          civicrm_email.is_bulkmail                                                       AS `is_bulkmail`,
          civicrm_email.signature_text                                                    AS `signature_text`,
          civicrm_email.signature_html                                                    AS `signature_html`,
          civicrm_im.id                                                                   AS im_id,
          civicrm_im.provider_id                                                          AS `im_provider`,
          civicrm_im.provider_id                                                          AS provider_id,
          civicrm_im.name                                                                 AS `im`,
          civicrm_openid.id                                                               AS openid_id,
          civicrm_openid.openid                                                           AS `openid`,
          civicrm_worldregion.id                                                          AS worldregion_id,
          civicrm_worldregion.name                                                        AS `world_region`,
          civicrm_website.id                                                              AS website_id,
          civicrm_website.url                                                             AS `url`,
          Group_concat(DISTINCT(civicrm_group.title))                                     AS groups,
          Group_concat(DISTINCT(civicrm_tag.name))                                        AS tags,
          Group_concat(DISTINCT(civicrm_note.note))                                       AS notes,
          civicrm_value_roles_2.id                                                        AS civicrm_value_roles_2_id,
          civicrm_value_roles_2.roles_1                                                   AS custom_1,
          civicrm_value_roles_2.participated_in_2                                         AS custom_2
FROM      civicrm_contact contact_a
LEFT JOIN civicrm_address
ON        (
                    contact_a.id = civicrm_address.contact_id
          AND       civicrm_address.is_primary = 1 )
LEFT JOIN civicrm_email
ON        (
                    contact_a.id = civicrm_email.contact_id
          AND       civicrm_email.is_primary = 1)
LEFT JOIN civicrm_phone
ON        (
                    contact_a.id = civicrm_phone.contact_id
          AND       civicrm_phone.is_primary = 1)
LEFT JOIN civicrm_im
ON        (
                    contact_a.id = civicrm_im.contact_id
          AND       civicrm_im.is_primary = 1)
LEFT JOIN civicrm_openid
ON        (
                    civicrm_openid.contact_id = contact_a.id
          AND       civicrm_openid.is_primary = 1 )
LEFT JOIN civicrm_location_type
ON        civicrm_address.location_type_id = civicrm_location_type.id
LEFT JOIN civicrm_group_contact
ON        civicrm_group_contact.contact_id = contact_a.id
AND       civicrm_group_contact.status = 'Added'
LEFT JOIN civicrm_group
ON        civicrm_group.id = civicrm_group_contact.group_id
LEFT JOIN civicrm_entity_tag
ON        (
                    civicrm_entity_tag.entity_table = 'civicrm_contact'
          AND       civicrm_entity_tag.entity_id = contact_a.id )
LEFT JOIN civicrm_note
ON        (
                    civicrm_note.entity_table = 'civicrm_contact'
          AND       contact_a.id = civicrm_note.entity_id )
LEFT JOIN civicrm_country
ON        civicrm_address.country_id = civicrm_country.id
LEFT JOIN civicrm_worldregion
ON        civicrm_country.region_id = civicrm_worldregion.id
LEFT JOIN civicrm_tag
ON        civicrm_entity_tag.tag_id = civicrm_tag.id
LEFT JOIN civicrm_value_roles_2
ON        civicrm_value_roles_2.entity_id = contact_a.id
LEFT JOIN civicrm_website
ON        contact_a.id = civicrm_website.contact_id
WHERE     ( (
                              contact_a.id IN (29 ) ) )
GROUP BY  contact_a.id
LIMIT     0, 1

[nativecode=1054 ** Unknown column 'civicrm_value_roles_2.roles_1' in 'field list']"] )
  • Sorry, I forgot to mention that even when a error message is received, a new contribution entry is created for "Pay later" contributions, but users are not sent to PayPal for online contributions. – Phil Morice Brubaker Jun 5 '15 at 22:13
  • Are you able to reproduce this on the demo server at demo.civicrm.org? If so, this is a bug, and should be reported at issues.civicrm.org. Be sure to include the exact steps needed to reproduce the bug on the demo server, and include a link to this StackExchange question! – Jon G - Megaphone Tech Jun 5 '15 at 22:14
  • I created a similar contribution page on the demo just now, but I can't access the Live or TestDrive pages to try it out. Maybe I just don't know how to use the demo.... – Phil Morice Brubaker Jun 5 '15 at 22:22
  • please give me a link to the page you created and I'll take a look? – Jon G - Megaphone Tech Jun 5 '15 at 22:26
  • Thanks, Jon. Here's the link to the demo page, but I get an error when I even try to view it (not the same as the error I am trying to solve): joomla.demo.civicrm.org/administrator/… – Phil Morice Brubaker Jun 5 '15 at 23:20
3

The core of this error message is this part:

 [nativecode=1054 ** Unknown column 'civicrm_value_roles_2.roles_1' in 'field list'] [to_string] => [db_error: message="DB Error: no such field" 

There's something about a custom field group called "Roles" you have that's got a problem. I wonder if you possibly had a custom field in it called "Roles" that you previously deleted, but wasn't removed from a profile?

I would try using a different profile, one that doesn't use custom fields, and see if that solves your problem. If so, try rebuilding the profile.

  • Thanks so much, Jon! I disabled the Custom Field "Roles" and that solved the problem. (I disabled it because it hung when I tried to delete the field outright. I'll have to figure that deletion problem later, but it's not pressing right now.) Thanks again. – Phil Morice Brubaker Jun 8 '15 at 3:49
  • 1
    I've seen similar errors with custom fields when the fieldset is of the wrong type. There are lots of confusing things you can do with custom fields included in profiles that get included into events, and you want to make sure that it all makes sense. – Alan Dixon Jun 10 '15 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.