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 »
  • Using Import (Moderator: Yashodha Chaku) »
  • Custom fields never import
Pages: [1]

Author Topic: Custom fields never import  (Read 389 times)

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Custom fields never import
February 13, 2014, 05:46:09 am
When importing contacts with custom fields, almost all of them never gets imported.

After some search I found that this static function => CRM_Core_BAO_CustomField::formatCustomField receive an array ($customFormatted) by reference.

Line 2110 of CRM_Contact_BAO_Contact.php

In my case it returns empty's sub-arrays for almost every custom field.

By using the return of the function like this => $foo = CRM_Core_BAO_CustomField::formatCustomField in addition to the referenced variable.

And by adding this line just before line 2182 => $data['custom'] = $foo;

I managed to solve it.

Hope it's ok this way
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Custom fields never import
February 13, 2014, 02:58:36 pm
If you have identified a bug please file a report at http://issues.civicrm.org/jira/browse/CRM

Create a user account and do your best to describe the issue and the suggested fix, with attachments, screenshots or examples.  One of the team will look at it and offer their solution.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Matthias de MAUROY - CYIM

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 4
  • Working at CYIM
    • CYIM
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • MySQL version: 5.1.66-community-log
  • PHP version: 5.3
Re: Custom fields never import
February 14, 2014, 01:44:02 am
I did it right after posting here ^^

Will be fixed in 4.5 release
Matthias de MAUROY
Analyste Web Developpeur
BU WEB
Tél. : +33 (0)2 99 22 83 40
Fax : +33 (0)2 99 22 83 41
Mail : m.mauroy@cyim.com
CYIM
31, rue de la Frébardière
35135 CHANTEPIE
FRANCE

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Custom fields never import

This forum was archived on 2017-11-26.