Getting the Following Errors:( Wish I could give you some more but its a basic setup, really only author_pane and user_relationship exists and this occurs when viewing another users profile when your not related to them.

Notice: Undefined index: join_date_type in author_pane_content_type_render() (line 44 of \sites\all\modules\author_pane\plugins\content_types\author_pane.inc).
Notice: Undefined variable: relationship in user_relationships_preprocess_author_pane() (line 77 of \sites\all\modules\user_relationships\user_relationships.author-pane.inc).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1070 of \sites\all\modules\user_relationships\user_relationships.module).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1070 of \sites\all\modules\user_relationships\user_relationships.module).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1070 of \sites\all\modules\user_relationships\user_relationships.module).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1070 of \sites\all\modules\user_relationships\user_relationships.module).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MGParisi’s picture

This is the only error I view the logged in profile...
Notice: Undefined index: join_date_type in author_pane_content_type_render() (line 44 of \sites\all\modules\author_pane\plugins\content_types\author_pane.inc).

fraweg’s picture

Hello,

I have the same error:
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1072 of /.../sites/all/modules/user_relationships/user_relationships.module).

@MGParisi Did you solve that issue?

Thanks for any Help.
Best regards
Frank

MGParisi’s picture

Nope, I gave up on it.

fraweg’s picture

hmm.. so you no longer use this module?

Edit: I have disable the author pane module until there is a solution...

Best regards
Frank

mrf’s picture

Title: Error with Authorpane and user relationships » Authorpane integration broken.
tjhart87’s picture

Figured i'd post this here too in case you didn't see the other. The error occurred when updating from Alpha 4 to Alpha 5 for me. I didn't have the issue before hand.

Valera Tumash’s picture

The same as #6. After upgrading from Alpha 4 to Alpha 5 - the following errors appear:

Notice: Undefined variable: relationship in user_relationships_preprocess_author_pane() (line 78 in /sites/all/modules/user_relationships/user_relationships.author-pane.inc).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1069 in /sites/all/modules/user_relationships/user_relationships.module).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1069 in /sites/all/modules/user_relationships/user_relationships.module).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1069 in /sites/all/modules/user_relationships/user_relationships.module).
Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1069 in /sites/all/modules/user_relationships/user_relationships.module).

And the name of Relatinship doesn't seem to appear on the Author Pane page.

giuseppecardaci’s picture

#7
I resolved by deleting "+ user_relationships_type_translations ($ relationship)" in line 78 of user_relationships.author-pane.inc

Valera Tumash’s picture

I guess there is an error in this function user_relationships_preprocess_author_pane in Author-pane integration. The variable $relationship actually can not exist because the only place where it is defined is the other side of "if/else"

BootstrapJohnny’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha5

I see the error (alpha 5):

Notice: Trying to get property of non-object in user_relationships_type_get_name() (line 1069 of /...../public_html/fooo/sites/all/modules/user_relationships/user_relationships.module).

It appeared after deleting a Relationship Type using the UI.

I followed the following procedure and yielded the results as follow:

  • Disabled Author Pane: no change
  • Disabled one component module of User Relationships at a time until the error disappeared (UR Blocks was "causing" it)... I re-enabled the UR Blocks
  • I verified in the database that there were no remnant instances of the rtid associated with the deleted relationship type (there were two, which I manually deleted)
  • I manually re-added the deleted type in the database directly, using the same rtid. (error disappeared)
  • I created a view to show all relationships and types (none of the second type I recreated were present)
  • I deleted the user relationship again (exact same error re-appeared)

My best guess is that there is somewhere a user that has a reference to the deleted rfid that I can't find which is causing the problem. I can't find a way to find or discover what is referencing this.

Please help... There should be a way to delete a relationship type without leaving orphans, or at least a warning that there are existing relationships that will be broken, and instructions for how to remove these.

Valera Tumash’s picture

Just has changed line 87 in user_relationships/user_relationships.author-pane.inc from

        l('<span>' . t('Add @rel_name', array('@name' => format_username($account)) + user_relationships_type_translations($relationship)) . '</span>',

to

        l('<span>' . t('Add @rel_name', array('@name' => format_username($account)) + user_relationships_type_translations($rtype)) . '</span>',

and the issue with incorrect display of "Add ..." has been resolved. Please make a patch for it.

blogook’s picture

Yup #11 works for me too

Andre-B’s picture

Status: Active » Needs review
FileSize
1.19 KB

made a patch out of #11

Status: Needs review » Needs work
Andre-B’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
Andre-B’s picture

Status: Needs work » Needs review
Nikro’s picture

Status: Needs review » Needs work

Hi everyone,

If you pay attention more things are broken here:

        l('<span>' . t('Add @rel_name', array('@name' => format_username($account)) + user_relationships_type_translations($rtype)) . '</span>',

Like @rel_name vs @name, etc.
I'll role out a new patch.

Nikro’s picture

I've changed it slightly, now you have to specify $rtype->rtid to load the tokens properly.

Anyway here's my patch, it worked for me, hope it works for you as well.

Nikro’s picture

Status: Needs work » Needs review

Always forget.

smscotten’s picture

Issue summary: View changes

This patch correctly cause the add/remove links to appear in my Author Panes. Thank you! I doubt I count as "the community" but consider me having reviewed it.

What it did not do (and I just want to clarify that it was not supposed to) was make the relationships for a particular Author (even if they are not relationships with the current user) appear in the Author Pane. That's something I expected but which may not have been realistic. However, if that functionality is supposed to be there it isn't working for me. I'll be glad to open a separate issue for this, but I'd like to make sure that it should be a separate issue.

Thanks.

Anybody’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that #18 works great and should be part of a new module version because the current version is completely broken in this point (logically wrong).

Setting this RTBC.

  • heylookalive committed 55a33b2 on 7.x-1.x authored by Nikro
    Issue #1553202 by Nikro, Andre-B: Authorpane integration broken
    
heylookalive’s picture

Status: Reviewed & tested by the community » Fixed

Thank you andre-b & Nikro, patch committed to dev.

Status: Fixed » Closed (fixed)

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