CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Fields for Membership / How to collect data on the contribution page?
Pages: [1] 2

Author Topic: Custom Fields for Membership / How to collect data on the contribution page?  (Read 4448 times)

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Custom Fields for Membership / How to collect data on the contribution page?
July 12, 2011, 06:18:44 pm
Hiya,
1. How to show the Membership custom fields on the contribution page?
2. Is creating profile the only way?
3. If so, why doesn't it save provided on the form details?

On civicrm demo site it even doesn't show these fields

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 12:53:07 am
OK, I created profile for membership and I am showing it on the contribution page.
However, right now, when I click Continue on the last-second contribution page I am getting database error:
Sorry. A non-recoverable error has occurred.
DB Error: constraint violation

I have migrated site to another server and I guess it could be the reason of that error.
Before migration I was able to save contribution, all contact details were savad in place but non of membership fields values were saved.
I am happy to move this post to "Professional Services" section where I am hopping to find an expert to get it sorted.
So, I am waiting for your quotes and info if it can be done and/or if not what is the best way to collect custom membership fields on crm

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 12:54:10 am
Quote
1. How to show the Membership custom fields on the contribution page?
Creating a profile of type Membership and including custom data in that.
Quote
2. Is creating profile the only way?
Yes
Quote
3. If so, why doesn't it save provided on the form details?
It should save membership related custom data to associated / created membership durung online contribution

HTh
Kurund
Found this reply helpful? Support CiviCRM

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 01:38:31 am
Thanks for your reply,
1. YES
2. YES
3. Unfortunately it doesn't save these details and it generates an error
I am looking for a professional service now so if you want to try do it then please let me know, I can pm you site details and username/login for test
Thank you again

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 02:09:28 am
First I would recommend you should try to replicate this issue on http://drupal.demo.civicrm.org and if you are able to replicate file a bug in issue tracker.

Kurund
Found this reply helpful? Support CiviCRM

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 02:17:20 am
Thanks, but I am working on joomla site

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 02:25:05 am
Oops sorry, you can check it on http://j16.demo.civicrm.org

Kurund
Found this reply helpful? Support CiviCRM

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 02:43:33 am
I did check it (first post here)
It is not showing an error but it is not saving these values

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 03:10:19 am
Please file a bug report in issue tracker and also provide link of contribution page that you tested.

Thanks
Kurund
Found this reply helpful? Support CiviCRM

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 03:31:58 am
Thanks, I hope I'll know where to report this bug :)
I have to add custom fields and create new profile again as it was cleared since I've done it before.
Thank you

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 03:55:10 am
Quote
I hope I'll know where to report this bug
Check: http://forum.civicrm.org/index.php/topic,21025.msg88149.html#msg88149

Kurund
Found this reply helpful? Support CiviCRM

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 04:15:46 am
mea culpa, mea culpa, mea maxima culpa,
I have created custom fields and profile again and it is working this time (believe me it didn't then)
It is saving these details there, so the problem is on my side somewhere

Any idea what could I brake down?

Big thank you Kurund again


Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
August 09, 2011, 10:44:35 am
You are on CiviCRM 4.0.1 and current demo is on CiviCRM v4.0.5, so thats one of the difference. So I am not sure if upgrade will fix your problem but worth the try.

Kurund
Found this reply helpful? Support CiviCRM

easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Re: Custom Fields for Membership / How to collect data on the contribution page?
September 08, 2011, 04:16:23 am
Hi, I've upgradet to 4.0.5

when I try to confirm contribution I am getting the below error message (I swapped the database and site name with xxxxx):

Code: [Select]
<div id="crm-container" lang="en" xml:lang="en">
<style type="text/css" media="screen">@import url(/administrator/components/com_civicrm/civicrm/css/civicrm.css);</style>
<style type="text/css" media="screen">@import url(/administrator/components/com_civicrm/civicrm/css/extras.css);</style>
<script type="text/javascript" src="/administrator/components/com_civicrm/civicrm/js/jquery/jquery.crmaccordions.js"></script>
<div class="messages status"> <div class="icon red-icon alert-icon"></div>
<span class="status-fatal">Sorry. A non-recoverable error has occurred.</span>
<div class="crm-section crm-error-message"></div>
<hr style="solid 1px" />
<div class="crm-section crm-error-message">DB Error: constraint violation</div>
<div class="crm-accordion-wrapper crm-accordion_title-accordion crm-accordion-closed crm-fatal-error-details-block">
<div class="crm-accordion-header">
<div class="icon crm-accordion-pointer"></div>
Error Details </div><!-- /.crm-accordion-header -->
<div class="crm-accordion-body">
<div class="crm-section">Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`xxxx_xxxx/civicrm_value_school__qualification_details_4`, CONSTRAINT `FK_civicrm_value_school__qualificat_baed7fcbea6e79a4` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_membership` (`id`), 1452</div>
<div class="crm-section">Additional Details: <p><pre>Array
(
[callback] =&gt; Array
(
[0] =&gt; CRM_Core_Error
[1] =&gt; handle
)
[code] =&gt; -3
[message] =&gt; DB Error: constraint violation
[mode] =&gt; 16
[debug_info] =&gt; INSERT INTO civicrm_value_school__qualification_details_4 ( qualification_date_11,student_members_please_state_dat_12,entity_id ) VALUES ( null,null,1 ) ON DUPLICATE KEY UPDATE qualification_date_11 = null,student_members_please_state_dat_12 = null [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`xxxxx_xxxxx/civicrm_value_school__qualification_details_4`, CONSTRAINT `FK_civicrm_value_school__qualificat_baed7fcbea6e79a4` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_membership` (`id`)]
[type] =&gt; DB_Error
[user_info] =&gt; INSERT INTO civicrm_value_school__qualification_details_4 ( qualification_date_11,student_members_please_state_dat_12,entity_id ) VALUES ( null,null,1 ) ON DUPLICATE KEY UPDATE qualification_date_11 = null,student_members_please_state_dat_12 = null [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`xxxx_xxxx/civicrm_value_school__qualification_details_4`, CONSTRAINT `FK_civicrm_value_school__qualificat_baed7fcbea6e79a4` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_membership` (`id`)]
[to_string] =&gt; [db_error: message=&quot;DB Error: constraint violation&quot; code=-3 mode=callback callback=CRM_Core_Error::handle prefix=&quot;&quot; info=&quot;INSERT INTO civicrm_value_school__qualification_details_4 ( qualification_date_11,student_members_please_state_dat_12,entity_id ) VALUES ( null,null,1 ) ON DUPLICATE KEY UPDATE qualification_date_11 = null,student_members_please_state_dat_12 = null [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`xxxx_xxxx/civicrm_value_school__qualification_details_4`, CONSTRAINT `FK_civicrm_value_school__qualificat_baed7fcbea6e79a4` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_membership` (`id`)]&quot;]
)
</pre></p><p></p></div>
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
<p><a href="http://www.xxxxxxx.ie/" title="Main Menu">Return to home page.</a></p>
</div>
</div>
<script type="text/javascript">
cj(function() {
cj().crmaccordions();
});
</script>

Is there anyone who has solved similar problem?
I want to add that I am getting this error only when I am showing on the contribution page two profiles together.
When I have them on to two separate contribution pages it works fine - I mean it saves/collects data without any problem but I can not use two separate contribution pages for renewal my membership because it will renew it twice.
« Last Edit: September 08, 2011, 04:26:31 am by easy »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Fields for Membership / How to collect data on the contribution page?
September 08, 2011, 08:45:01 am
I think problem might be with certain type of custom data that you are using in profile. Can you give more details on custom data that is used in the profile

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Fields for Membership / How to collect data on the contribution page?

This forum was archived on 2017-11-26.