Results 1 to 6 of 6

Thread: Import multiselect error

  1. #1
    Amadeus7 is offline Member
    Join Date
    Dec 2008
    Posts
    19

    Default Import multiselect error

    When importing multiselect field empty value, we get error in sugar ce 5.1 and 5.2. This is a bug.

    NOTICE: [8] Array to string conversion on line 329 in file \modules\Import\ImportFieldSanitize.php
    NOTICE: [8] Undefined index: LBL_ERROR_INVALID_MULTIENUM on line 328 in file \modules\Import\views\view.step4.php
    NOTICE: [8] Array to string conversion on line 227 in file \modules\Import\ImportFile.php
    Last edited by Amadeus7; 2009-01-23 at 01:42 PM. Reason: spell error

  2. #2
    maus is offline Senior Member
    Join Date
    Aug 2008
    Location
    Netherlands, Amsterdam
    Posts
    80

    Default Re: Import multiselect error

    same problem here

  3. #3
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,850

    Default Re: Import multiselect error

    Did you guys report the bug? Or at least check whether there is already a bug report? I think this is important.
    __________________________
    Robert Laussegger
    http://www.iscongroup.net

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch gibt es hier: http://goo.gl/kPsAz
    Ab sofort auch mit 6.4.2

  4. #4
    Amadeus7 is offline Member
    Join Date
    Dec 2008
    Posts
    19

    Default Re: Import multiselect error

    Well we have checked it is a bug reported. No official fix so far 5.2.

  5. #5
    lionel.ibis is offline Junior Member
    Join Date
    Jan 2008
    Location
    France
    Posts
    4

    Default Re: Import multiselect error

    I had the same problem. It seems that an empty value in a multi selection field produce an array with one null value instead of a simple empty value.
    I solved the proble by modifying modules/import/view/view.step4.php. I changed
    this (around line 297):
    // If the field is empty then there is no need to check the data
    if( !empty($rowValue) ) {
    to :
    if (is_array($rowValue) && count($rowValue) == 1 && trim($rowValue[0]) == '') $rowValue = '';
    // If the field is empty then there is no need to check the data
    if( !empty($rowValue) ) {
    (I've added the first line)

  6. #6
    Amadeus7 is offline Member
    Join Date
    Dec 2008
    Posts
    19

    Default Re: Import multiselect error

    That is a solution!


    case 'multienum':
    if ( $rowValue[0] != "" )
    {
    $fieldDef['type']='enum';
    $returnValue = $ifs->multienum($rowValue,$fieldDef);
    if ( !$returnValue )
    {
    $importFile->writeError(
    $mod_strings['LBL_ERROR_NOT_IN_ENUM']
    . implode(",",$app_list_strings[$fieldDef['options']]),
    $fieldTranslated,
    $rowValue);
    $do_save = 0;
    }
    else
    $rowValue = $returnValue;
    }
    else
    $rowValue="";
    break;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Import Error!
    By Derek in forum Help
    Replies: 3
    Last Post: 2006-10-02, 11:41 AM
  2. Import Error
    By xian in forum Help
    Replies: 0
    Last Post: 2006-02-27, 01:39 PM
  3. import fatal error
    By jbagnall in forum Help
    Replies: 1
    Last Post: 2005-02-05, 03:43 PM
  4. Import error
    By mornature in forum Help
    Replies: 1
    Last Post: 2004-09-21, 05:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •