Results 1 to 8 of 8

Thread: upgrade from 4.0.1 to 4.2.1b

  1. #1
    elvispresley99 is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    54

    Default upgrade from 4.0.1 to 4.2.1b

    Can anyone help with this?

    The upgrade wizard worked fine, and showed no errors. In both the test and production environements, I get the following error message when viewing the Opportunities screen:

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Program Files\SugarCRM\oss\httpd\htdocs\SugarCRM\include\u tils\array_utils.php on line 63.

    The file indicated (array_utils.php) looks like this:

    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    /************************************************** *******************************
    * The contents of this file are subject to the SugarCRM Public License Version
    * 1.1.3 ("License"); You may not use this file except in compliance with the
    * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
    * Software distributed under the License is distributed on an "AS IS" basis,
    * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
    * for the specific language governing rights and limitations under the
    * License.
    *
    * All copies of the Covered Code must include on each user interface screen:
    * (i) the "Powered by SugarCRM" logo and
    * (ii) the SugarCRM copyright notice
    * in the same form as they appear in the distribution. See full license for
    * requirements.
    *
    * The Original Code is: SugarCRM Open Source
    * The Initial Developer of the Original Code is SugarCRM, Inc.
    * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
    * All Rights Reserved.
    * Contributor(s): ______________________________________.
    ************************************************** ******************************/


    //to_string methods to get strings for values

    // var_export gets rid of the empty values that we use to display None
    // thishelper function fixes that

    function var_export_helper($tempArray)
    {
    if(!is_array($tempArray)){
    return var_export($tempArray, true);
    }
    $addNone = 0;

    foreach($tempArray as $key=>$val)
    {
    if($key == '' && $val == '')
    $addNone = 1;
    }

    $newArray = var_export($tempArray, true);

    if($addNone)
    {
    $newArray = str_replace("array (", "array ( '' => '',", $newArray);
    }

    return $newArray;
    }

    //this function is used to overide a value in an array and returns the string code to write
    function override_value_to_string($array_name, $value_name, $value){
    $string = "\${$array_name}[". var_export($value_name, true). "] = ";
    $string .= var_export_helper($value,true);
    return $string . ";";
    }

    function add_blank_option($options){
    if(!isset($options['']) && !isset($options['0']))
    $options = array_merge(array(''=>''), $options);
    return $options;
    }

    // This function iterates through the given arrays and combines the values of each key, to form one array
    // Returns FALSE if number of elements in the arrays do not match; otherwise, returns merged array
    // Example: array("a", "b", "c") and array("x", "y", "z") are passed in; array("ax", "by", "cz") is returned
    function array_merge_values($arr1, $arr2) {
    if (count($arr1) != count($arr2)) {
    return FALSE;
    }

    for ($i = 0; $i < count($arr1); $i++) {
    $arr1[$i] .= $arr2[$i];
    }

    return $arr1;
    }
    ?>




    The error message shows up in the opportunity section just before the oportunity search section.

    Thank you for your help with this.

  2. #2
    elvispresley99 is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    54

    Unhappy HELP please -- upgrade from 4.0.1 to 4.2.1b

    Does anyone have an answer to this? I have run into this one previous upgrade, and the only way to get it back was to reload all of Sugar. In addition, there was a HUGE amount of efffort in recreating the custom forms. This is not an option now, as Sugar is used by many users, and they can't afford to be down. I am not sure why this array error message is happening, but I would appreciate any insight you guys might be able to share.

    Thanks again for your help!

  3. #3
    clint's Avatar
    clint is offline Sugar Team Member | Forums Lead Moderator
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,120

    Default Re: upgrade from 4.0.1 to 4.2.1b

    I doubt the problem is with the array_merge function. As you see by the error, a non-array is being passed into this function.

    What Opportunity screen are you having issues with? Detail View or Edit View? Do you have any code customizations in the Opportunity module? Did you load any third-party modules from Sugar Forge?
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

  4. #4
    elvispresley99 is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    54

    Default Re: upgrade from 4.0.1 to 4.2.1b

    Hi Clint, and thanks for your response.

    The only place that it shows up is in the Opportunity : Home. Edit, and Detail views are fine. Merely selecting the Opportunities tab displays that error message.

    No other 3rd party items have been added, and the only customizations are add'l custom fields that have been added through the Sugar Admin interface.

  5. #5
    elvispresley99 is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    54

    Default Re: upgrade from 4.0.1 to 4.2.1b

    This is the path to the page that is being accessed when the error message appears? Is this simply indicating that there is a problem with the index files in the Opportunities Module?

    http://fc7702/sugarcrm/index.php?mod...s&action=index

  6. #6
    elvispresley99 is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    54

    Default Re: upgrade from 4.0.1 to 4.2.1b

    Anyone come up with anything on this? I am really struggling to get this ffixed.

    I have posted a similar issue with this once in the past, and it came down to an upgrade then too.

    I would really appreciate any insight.

    Thanks.

  7. #7
    elvispresley99 is offline Sugar Community Member
    Join Date
    Aug 2004
    Posts
    54

    Default Re: upgrade from 4.0.1 to 4.2.1b

    Would anyone be able to give me further guidance on this?

    I have attached my diagnostics file. I can't see that it's causing problems in data storing, but my users are complaining about the error message.

    Thanks in advance.
    Attached Files Attached Files

  8. #8
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: upgrade from 4.0.1 to 4.2.1b

    Do you have custom fields defined for the Opportunities module? I suppose it could be related to that.

    Also, do you have any extra modules installed?
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

Thread Information

Users Browsing this Thread

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

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
  •