Hi,

installing UR, I got this message while trying to get to my profile (made by core profiles) or trying to read a post in forum (Advanced Forum 6.x-1.1):
Fatal error: Call to undefined function author_pane_run_preprocess() in /.../sites/all/modules/user_relationships/user_relationships_api/user_relationships_api.author-pane.inc on line 14

The site is using Panels (6.3.8) and CTools, APK, Author Pane, Node Gallery (less than 40 modules in all).

Thanks for helping.

CommentFileSizeAuthor
#7 AP 2.x22.03 KBalex.k

Comments

alex.k’s picture

Can you please verify you are using the latest Author Pane? There have been recent changes to the UR implementation of it to align with the changes in AP.

Québec’s picture

Hi,

I'm using Author Pane 6.x-1.1 . This morning I will upgrade to AP 2; I'm guessing by your answer that the problem is AP 6.1.1.

Thanks for helping.

R.

Ela’s picture

Hello,
Author Pane 2 seems to require Advanced Forum 2, which is in Alpha stage.. Also in the notes: http://drupal.org/node/848560 is says: "This alpha is intended to work with Author Pane Beta 1 and may not work quite right with older versions because the theme function changed." And: "it's still alpha so make sure you do extensive testing of your own before deploying on a live site and when upgrading. "
This is confusing as to which version of Author Pane and Advanced forum to use.
I have been using 6.x-1.1 of Advanced Forum and Author Pane 6.x-1.1, same as Québec. If that's not going to work with User Relationship newest 1.0 release, Please advice on versions to use.

alex.k’s picture

Project: User Relationships » Author Pane
Version: 6.x-1.0 » 6.x-2.x-dev

Michelle, please help. What do we need to make UR compatible with both AP 1 and 2?

michelle’s picture

Ah, sorry, I dropped the ball on this. The problem is that Author Pane 1.x should be deprecated. The only use for it is for AF 1.1 and 1.2 was supposed to have been out ages ago but the person who agreed to help me with it was a no show and I've been too swamped. I don't use AF/AP 1.x anymore and don't test against it so forgot about this. There are two routes to fix this:

1) Check function_exists('author_pane_run_preprocess') before calling it. That bit serves no purpose with AP 1.x so simply not running it is fine. This is the simplest method and the one I recommend given that AP 1.x is pretty much EOL.

2) Wrap the whole thing in if (function_exists('author_pane_api') && author_pane_api() == "2") {} and provide an else case with the older code for the UR integration with AP 1.x. This is a bit more work and, frankly, I'm not interested in doing it and don't expect Alex to do it, either. If someone is interested in making this totally backwards compatible, patches welcome.

So, my recommended fix in a pesudo patch because I'm changing computers and have no dev environment ATM:

-  if (!author_pane_run_preprocess('user_relationships_api', $variables['caller'])) {
+  if (function_exists('author_pane_run_preprocess') && !author_pane_run_preprocess('user_relationships_api', $variables['caller'])) {

Again, sorry for the hassle. Hopefully answering promptly makes up for annoying you with fixing stuff I broke. :)

Michelle

michelle’s picture

Project: Author Pane » User Relationships
Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Active » Needs review

Forgot to move this back...

Michelle

alex.k’s picture

StatusFileSize
new22.03 KB

Committed a fix in http://drupal.org/cvs?commit=469152

To those upgrading to the dev release or testing: this should restore compatibility with author_pane 1.x and keep 2.x working, too.

In author_pane 1.x I don't see icons next to relationship links. If someone can confirm they weren't there before, that would help. AP 2.x has the icons. Attached a screen of what I mean.

michelle’s picture

@Alex: It's quite likely the icon is broken in 1.x. That's what I was talking about before with full compatibility it would need to check the API version and then use the old code for 1.x. I would rather use my time to finishing what needs to be done to get rid of AP 1.x but if someone who is using 1.x wants to take the time to make it work better, that's what needs to be done. At this point, it's sorta like putting resources into Drupal 5 modules. ;)

Michelle

Québec’s picture

Good Morning!

I did the switch to Author Pane II and User relationship is now working 100%.

In the Author pane, I have replaced the «mail», «add» and «remove» icons with big ones: i'm struggling to align them at the right of the panel (Panels 3.x). When doing so, the «online» and «mail» link «spring out» of the pane into the center of the screen! An other thing: my buttons overlap. Where do I have to look to make the proper corrections?

Thank! And Merry Christmas!

michelle’s picture

@Québec: That has nothing to do with this issue; you need to tweak your CSS. I suggest getting Firebug for Firefox so you can easily see what CSS is affecting it.

Michelle

alex.k’s picture

Status: Needs review » Fixed
alex.k’s picture

Title: Cannot install User Relationships » Incompatible with Author Pane 1.x

Changing to a more descriptive title

Status: Fixed » Closed (fixed)

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