Results 1 to 7 of 7

Thread: Fatal error: getQuery on non-object

  1. #1
    Earth_Mother is offline Member
    Join Date
    Jan 2010
    Posts
    7

    Default Fatal error: getQuery on non-object

    I set up and deployed a simple Product module, with the intent of setting up order management. Then I created a Payments module and linked it to Accounts.

    Left to go put kiddos in bed and returned to this (Sugar 5.5):

    Fatal error: Call to a member function getQuery() on a non-object in .../modules/Contacts/Contact.php on line 500

    I looked up line 500 and found this:
    function load_contacts_users_relationship(){
    global $current_user;

    $this->load_relationship("user_sync");
    $query_array=$this->user_sync->getQuery(true);

    $query_array['where'] .= " AND users.id = '$current_user->id'";

    $query='';
    foreach ($query_array as $qstring) {
    $query.=' '.$qstring;
    }

    $list = $this->build_related_list($query, new User());
    if(!empty($list)){
    //this should only return one possible value so set it
    $this->contacts_users_id = $list[0]->id;
    }




    I don't even have a clue what questions to ask to help resolve this.


    Anyone? Thank you!
    Last edited by Earth_Mother; 2010-01-19 at 05:14 AM.

  2. #2
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Fatal error: getQuery on non-object

    First guess would be to repair all, twice.

    Then, are any custom vardefs for Contacts in place?
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  3. #3
    Earth_Mother is offline Member
    Join Date
    Jan 2010
    Posts
    7

    Default Re: Fatal error: getQuery on non-object

    Thank you.

    I would love to try repairing, but I cannot even access the login page.

    Any thoughts there?

    No, there are no custom vardef fields in place.

  4. #4
    daniel.passarini's Avatar
    daniel.passarini is offline Sugar Community Member
    Join Date
    Apr 2006
    Location
    São Paulo - SP / Brasil
    Posts
    80

    Default Re: Fatal error: getQuery on non-object

    You created a new module (Payments), linked to Accounts and then even the login page has broken?
    Daniel de Carvalho Passarini

    "Fascinating" - Dr. Spock

  5. #5
    Earth_Mother is offline Member
    Join Date
    Jan 2010
    Posts
    7

    Default Re: Fatal error: getQuery on non-object

    Um...yeah? As far as I can tell.

    When I go to the login URL (or any URL within Sugar), I get this fatal error.

    I have static IP at home and shop, and when I change locations, Sugar forces me to re-login. I'm *somewhat* hoping that when I get to my shop, the change in IP will allow me to re-login (under a different user since this seems to be user-related?) and repair. Although, I'm totally talking out my...other side. (EDIT: No dice. My business partner just got to her office and she can't get in, either.)

    I had started creating our database in Filemaker, a program I'm familiar with. But quickly realized the financial limitations as we're building a sales team...so went in search of different options and stumbled upon Sugar.

    All I've done so far is begin to re-create the table/field structure in my Filemaker database, set up email, and begin creating and modifying roles and users.

    I've made a Product module, which isn't yet related to any other modules, and a Payments module, which is related only to Accounts. And then began the field framework for...many modules, including Manufacturing (raw materials, components, equipment assets, processes) and a Media Contacts module. I deployed the latter two, even though there aren't any fields, because I'm visual and needed to see how they come together in the menus/tabs.

    Eventually I'd like to link Sugar to our shopping cart MySQL database (had begun that process in Filemaker), so I guess this little error will help me get familiar with Sugar first?
    Last edited by Earth_Mother; 2010-01-19 at 04:17 PM.

  6. #6
    Earth_Mother is offline Member
    Join Date
    Jan 2010
    Posts
    7

    Default Re: Fatal error: getQuery on non-object

    Update: The login screen DID just come up (although...not sure how/why/what's different), but I am immediately presented the same fatal error.

  7. #7
    zengraphics is offline Junior Member
    Join Date
    Jul 2009
    Posts
    4

    Default Re: Fatal error: getQuery on non-object

    Fatal error: Call to a member function getQuery() on a non-object in /*********/sugarcrm/modules/Contacts/Contact.php on line 463

    I installed a invoice module from Sugarforge, I removed the module after I got the error
    Failed opening required 'modules/Invoice/Invoiceconfig.php' (include_path='/*******/sugarcrm/include/..:.:/usr/local/php52/pear') in /home/crmzen/public_html/sugarcrm/modules/Administration/RebuildRelationship.php on line 78

    PHP Fatal error: Call to a member function getQuery() on a non-object in /home/******/public_html/sugarcrm/modules/Contacts/Contact.php on line 463

    UPdate:
    You can move your SQL database to a new verison Sugarcrm if you now how to do that I did not loose any data.
    (Wife moved it for me she is software engineer. )
    :-)
    Last edited by zengraphics; 2010-02-04 at 05:50 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 2012-01-10, 10:36 AM
  2. Replies: 2
    Last Post: 2010-01-12, 11:20 AM
  3. Replies: 3
    Last Post: 2009-12-07, 07:57 PM
  4. Replies: 0
    Last Post: 2009-11-15, 07:39 PM
  5. Replies: 3
    Last Post: 2009-02-09, 03:05 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
  •