Results 1 to 6 of 6

Thread: Error fetching relationship & Missing relationship definition

  1. #1
    davideps is offline Member
    Join Date
    May 2011
    Posts
    15

    Default Error fetching relationship & Missing relationship definition

    Hello,

    I am using SugarCRM CE 6.1.4 on Ubuntu 10.04

    I created a one-to-many relationship between DOCUMENTS and NOTES. I also creates several many-to-many relationships between NOTES AND NOTES. One problem that I encountered was that there was no "remove" button in the many-to-many subpanels in notes to remove a relationship.

    Just recently, I clicked on the "edit" column of one of the subpanels (which had no rows of data) and got a "database failure error, check sugarcrm.log". I've pasted the tail end of the log below. I keep getting this message when viewing this particular note. But, others seem to display normally (still without the option to remove relationship instances).

    Can anyone tell me how to fix this?

    thank you,
    -david


    Tue May 10 09:53:06 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:06 2011 [2571][1][FATAL] Missing relationship definition notes_documents. skipping notes_documents subpanel
    Tue May 10 09:53:09 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:09 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:09 2011 [2571][1][FATAL] Missing relationship definition notes_documents. skipping notes_documents subpanel
    Tue May 10 09:53:13 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:13 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:13 2011 [2571][1][FATAL] Missing relationship definition notes_documents. skipping notes_documents subpanel
    Tue May 10 09:53:15 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:15 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:15 2011 [2571][1][FATAL] Missing relationship definition notes_documents. skipping notes_documents subpanel
    Tue May 10 09:53:17 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:17 2011 [2571][1][FATAL] Error fetching relationship from cache notes_documents
    Tue May 10 09:53:17 2011 [2571][1][FATAL] Missing relationship definition notes_documents. skipping notes_documents subpanel
    Tue May 10 09:53:17 2011 [2571][1][FATAL] MySQL error 1054: Unknown column 'edit_button' in 'order clause'

  2. #2
    jmertic is offline Sugar Community Manager
    Join Date
    Dec 2007
    Posts
    2,224

    Default Re: Error fetching relationship & Missing relationship definition

    Try Repairing Relationships, and then a Quick Rebuild and Repair.

  3. #3
    davideps is offline Member
    Join Date
    May 2011
    Posts
    15

    Default Re: Error fetching relationship & Missing relationship definition

    Thank you. I think this may have cleared the error. But, I still do not have the option of adding a "remove" button to the notes subpanel that links one note with others. Whenever one creates a custom relationship in Studio, should there always be a way to create, edit, and remove that relationship through the panels.

    -david

  4. #4
    jmertic is offline Sugar Community Manager
    Join Date
    Dec 2007
    Posts
    2,224

    Default Re: Error fetching relationship & Missing relationship definition

    You could add the button in the subpanel definition as shown below:

    PHP Code:
    'remove_button'=>array(
                
    'vname' => 'LBL_REMOVE',
                 
    'widget_class' => 'SubPanelRemoveButton',
                 
    'width' => '2%',
            ), 

  5. #5
    davideps is offline Member
    Join Date
    May 2011
    Posts
    15

    Default Re: Error fetching relationship & Missing relationship definition

    hi jmertic,

    So when you create a many-to-many relationship, a remove button isn't automatically one of the options in the subform layout?

    I've not tried to edit any of the php code yet. I've worked exclusively through the web interface. Could you provide a little more detail? What would be the path to the file I need to add this code to? Do I need to add the code to a particular part of the file or just adding it to the end is sufficient?

    thank you so much,
    -david

  6. #6
    jmertic is offline Sugar Community Manager
    Join Date
    Dec 2007
    Posts
    2,224

    Default Re: Error fetching relationship & Missing relationship definition

    It should be added by default, but it seems in your case it wasn't.

    To add this, copy the modules/<module name>/metdata/subpaneldefs.php to custom/modules/<module name>/metdata/subpaneldefs.php and then add the code snippet to the field list array.

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: 2
    Last Post: 2011-08-17, 08:55 AM
  3. Error fetching relationship
    By hiko in forum Developer Help
    Replies: 1
    Last Post: 2011-04-18, 11:46 AM
  4. Error fetching relationship
    By bblankenship78 in forum Help
    Replies: 0
    Last Post: 2010-12-22, 05:53 PM
  5. Error fetching relationship from cache contacts_users
    By webnetin in forum Developer Help
    Replies: 0
    Last Post: 2009-06-20, 07:18 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
  •