Results 1 to 10 of 10

Thread: Warning: array_key_exists() [function.array-key-exists]: The second argument should b

  1. #1
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Warning: array_key_exists() [function.array-key-exists]: The second argument should b

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in E:\SugarCRM\modules\Relationships\Relationship.php on line 190

    Sugar version 5.2.0c tried upgrading to 5.2.0h Fatal error in home and contacts tab, appears between search and account list in accounts, twice between search and case list in cases, also in opportunities, activities, documents, leads, campaigns, projects, bug tracker...
    If I copy files over from a backup and not the DB then the problem goes away. If I then do a repair DB the error returns.

    Appears to be a vardef problem? Any help would be appreciated.

  2. #2
    josh.sweeney is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Ga
    Posts
    339

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    Do you have any custom fields or relationships?

  3. #3
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    Yes I have both. I also have 2 custom modules. How do I determine the culprit, if that is the issue?

  4. #4
    josh.sweeney is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Ga
    Posts
    339

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    One thing to try would be to move everything out of the custom directory and do a repair and rebuild.

    Make sure the backup your files and database before doing this.

  5. #5
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    I have tried this twice this morning all with the same result.

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in E:\SugarCRM\modules\Relationships\Relationship.php on line 190

    Fatal error: Call to a member function getQuery() on a non-object in E:\SugarCRM\modules\Contacts\Contact.php on line 461

    If I do a restore, the system is operational. If I attempt a repair and rebuild it breaks. I think I have a broke vardefs file.

  6. #6
    josh.sweeney is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Ga
    Posts
    339

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    Does it give you this error right when you go to the CRM url, when you login, or when you click a specific area?

  7. #7
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    i got it back to the original error. It is fatal on home and contacts. It is a line between search and and the results list on other pages. Admin looks ok.

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in E:\SugarCRM\modules\Relationships\Relationship.php on line 190

  8. #8
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    Now I am seeing worthwhile errors:
    08/04/09 09:07:55 [4704][1][FATAL] Error fetching relationship from cache contacts_users
    08/04/09 09:12:27 [4704][1][FATAL] Error fetching relationship from cache contacts_users
    08/04/09 09:12:30 [4704][1][FATAL] Error fetching relationship from cache contacts_users
    08/04/09 09:17:12 [4704][1][FATAL] Error fetching relationship from cache contacts_users
    08/04/09 09:18:18 [4704][1][FATAL] Error fetching relationship from cache contacts_users
    08/04/09 09:20:10 [4704][1][FATAL] Error fetching relationship from cache contacts_users
    08/04/09 09:20:15 [4704][1][FATAL] Error fetching relationship from cache accounts_assigned_user
    08/04/09 09:22:35 [4704][1][FATAL] Error fetching relationship from cache account_cases
    08/04/09 09:22:35 [4704][1][FATAL] Error fetching relationship from cache cases_assigned_user
    08/04/09 09:35:40 [4704][1][FATAL] Error fetching relationship from cache accounts_opportunities
    08/04/09 09:35:40 [4704][1][FATAL] Error fetching relationship from cache opportunities_assigned_user

  9. #9
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    http://www.sugarcrm.com/wiki/index.p...hip_from_cache

    I found this article that gave me instructions to retreive the relationships and repair them. I will now try to do the repair and rebuild.

  10. #10
    rappleby is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    Springfield, MO
    Posts
    23

    Default Re: Warning: array_key_exists() [function.array-key-exists]: The second argument shou

    OK. Here is the synopsis. When I do a repair and rebuild, the files:SugarCRM\cache\modules\Relationships\relatio nships.cache.php and SugarCRM\cache\modules\Relationships\Relationshipv ardefs.php are destroyed and not rebuilt. By manually restoring these two files from a backup the error is cleared.

    Now the question is, why is this happening? I have to be able to do a repair and rebuild or I can never upgrade again? What is corrupt that is causing these files to be destroyed during the repair process?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2007-11-07, 02:28 PM
  2. Replies: 1
    Last Post: 2007-11-07, 01:50 PM
  3. Replies: 1
    Last Post: 2007-09-05, 01:09 AM
  4. Replies: 2
    Last Post: 2006-05-15, 01:35 PM
  5. Replies: 0
    Last Post: 2005-11-14, 04:51 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
  •