First, great module, I'm excited about this project. I realize it's very new but since the queue is open I imagine you're ready to start recieving bug reports.

When I try to add a new relationship to a contact (eg crm/contact/1/relationships/add/crm_employee) I get an error:

Notice: Undefined offset: 6 in _menu_translate() (line 776 of /[DRUPAL_ROOT]/includes/menu.inc).

Seems to happen with all contacts and relationship types.

CommentFileSizeAuthor
#1 crm_core-menu_items-1397322-1.patch1.53 KBAnonymous (not verified)

Comments

Anonymous’s picture

StatusFileSize
new1.53 KB

Thank you for the kind words! Kind of excited about it myself.

Looking into this right now. It seems there was an extra menu router entry that was causing the issue. I adjusted that, and added text labels to the relationship types.

Try this patch and let me know how it works for you.

Rene Hostettler’s picture

I've just applied this fix and the error message "Undefined offset: 6 in _menu_translate()" is no longer displayed.

I still haven't been able to create any relationships between different contacts. In the field to add the relationship on a contact it says that only that contact type can be used. If a different one is used for example creating a relationship between an individual as an employee of a company I get this error:
"Please, input destination contact."

I have tried changing both destination and source settings on the relationship to all but dosent seem to make any difference.

Is this a bug or am I misunderstanding how relationships are meant to work?

wjaspers’s picture

Status: Active » Needs work
+++ b/modules/crm_core_relationship_ui/crm_core_relationship_ui.moduleundefined
@@ -36,6 +36,10 @@ function crm_core_relationship_ui_menu() {
+  /*
+   * TODO: what does this router item do? ¶
+   *       I think all it does is create notices, it does not seem to be used
+   *       ¶
   $items['crm/contact/%crm_core_contact/relationships/add/%relation_type/%'] = array(
     'title' => 'Add Contact Relationship',
     'description' => 'Add a relationship to this contact',
@@ -47,6 +51,7 @@ function crm_core_relationship_ui_menu() {

@@ -47,6 +51,7 @@ function crm_core_relationship_ui_menu() {
     'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
     'file' => 'crm_core_relationship_ui.pages.inc',
   );

Patch contains excess whitespace from tabs.

In looking at this router item, it looks like:
1) Its predecessor defines a specific CRM Relationship between contacts (much more like an Entity).
2) The router item itself defines a specific instance of that CRM Relationship type (much more like a Bundle). << Thus allowing someone to create an instance of the relationship.

dealancer’s picture

Status: Needs work » Fixed

oh, this patch was committed long time ago and looks like the spaces are ok. So I am updating status of this issue to fixed. If you will find any new issues related with this, please reopen this issue or create new one.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.