Results 1 to 3 of 3

Thread: Fatal Error loading custom relationship

  1. #1
    kwoitena is offline Member
    Join Date
    Dec 2008
    Location
    San Antonio, TX
    Posts
    16

    Exclamation Fatal Error loading custom relationship

    We have a custom relationship in the Opportunities module that will display the line items from a quote onto the Opportunity. This code worked in 4.5.1 and in 5.0.0i. We're testing 5.2.0a and this is a major but that is preventing us from going live with it.

    In Sugar, the error displayed on the screen is:
    Code:
    Fatal error: Call to a member function getBeans() on a non-object in /var/www/html/sugarupgrade/data/SugarBean.php on line 936
    I do not believe that the problem is not in SugarBean, but simply the data being passed through SugarBean that's causing the error.

    In the logs, we get this:
    Code:
    [FATAL] Error fetching relationship from cache product_bundle_opportunity
    This is line 936 in SugarBean.php:
    Code:
    return $this->$field_name->getBeans(new $bean_name(), $sort_array, $begin_index, $end_index, $deleted, $optional_where);
    If I comment out this line of code in view.detail.php, the Detail View works, without displaying the line items:
    Code:
    $product_bundle_list = $this->bean->get_linked_beans('product_bundles','ProductBundle');
    Because it references the product_bundle_opportunity in the log, I know it is the customization to display these line items. I've checked the code in Quotes (where the line item information does not break) and with the obvious exceptions, the code is identical to the view.detail.php in Opportunities. I've also checked in vardefs and made sure that the appropriate fields were defined there. I'm running out of places to look and I hope someone else can assist.

    Sugar 5.2.0a
    Apache 2.2.3
    MySQL 5.0.58
    PHP 5.2.6
    Last edited by kwoitena; 2009-02-23 at 05:09 PM.

  2. #2
    kwoitena is offline Member
    Join Date
    Dec 2008
    Location
    San Antonio, TX
    Posts
    16

    Default Re: Fatal Error loading custom relationship

    To fix this problem, I read through all the php files related to the ProductBundle and found that several variables were left undefined. I created the definitions for these variables and the module worked again.

  3. #3
    palomino5 is offline Junior Member
    Join Date
    Mar 2009
    Posts
    2

    Default Re: Fatal Error loading custom relationship

    hi!
    i've the same problem, and i can't fix the problem yet.
    can you say me wich files and variables i have to fix?
    Thanks!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 2012-02-02, 08:49 AM
  2. Replies: 17
    Last Post: 2011-11-03, 07:46 PM
  3. Replies: 3
    Last Post: 2008-08-23, 06:55 AM
  4. Replies: 4
    Last Post: 2008-06-18, 07:21 PM

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
  •