Results 1 to 2 of 2

Thread: Fatal error: Call to a member function get() on a non-object

  1. #1
    bbeyst is offline Sugar Community Member
    Join Date
    Mar 2011
    Posts
    20

    Default Fatal error: Call to a member function get() on a non-object

    Greetings everyone....

    I'm trying to work with Lampada Portal 1.0.1 on a SugarCE 5.5.1 instance and keep getting the Fatal error: Call to a member function get() on a non-object message.

    The offending code is as follows from /iportal / include / subpanel / subpanneldef.php:

    elseif ($list_filter_option == FILTER_BY_CONTACT) {
    foreach($seed->get_linked_fields() as $link) {
    if( isset($seed->$link['name']) && strtolower($seed->$link['name']->getRelatedTableName()) == 'contacts' ) {
    $relationship = $link['relationship'];
    $contact->load_relationship($relationship);

    //TK - Fix for N-N relationships
    if (!is_object($contact->$relationship)) {
    $relationship = $seed->table_name;
    $contact->load_relationship($relationship);
    }

    $seed_ids = $contact->$relationship->get();


    Reading through the forums from about a year ago, David O'Keefe suggests that the fatal error arises from a lost / missing relationship between Contacts and the Portal Users modules. I attempted to create a one-to-one relationship between these two modules via the Studio, but the error persists.

    Other online reading suggests something in the $seed_ids = $contact->$relationship->get(); statement is not being properly initialized -- but as a non-programmer I struggle to determine what may be missing in the code.

    Can anyone point me in the right direction?

    Thanks in advance!!

  2. #2
    bbeyst is offline Sugar Community Member
    Join Date
    Mar 2011
    Posts
    20

    Default Re: Fatal error: Call to a member function get() on a non-object

    Well, I absolutely do not understand the solution I discovered, but if anyone wants to elucidate the issue I'd be very interested in the input.

    In /iportal / include / subpanel / IportalSubPanelDefinitions.php I commented out the entire function aIportalSubPanel from the class aIportalSubPanel extends aSubPanel. The offending code listed in the above original post exists within this function.

    Again, if anyone cares to take a stab at elucidating why this function caused issues in Iportal, I'd be very happy to read about it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2010-01-12, 11:20 AM
  2. Replies: 0
    Last Post: 2009-11-15, 07:39 PM
  3. Replies: 4
    Last Post: 2006-09-26, 02:21 PM
  4. Replies: 0
    Last Post: 2005-12-18, 08:16 AM

Tags for this Thread

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
  •