array(4) { ["type"]=> int(1) ["message"]=> string(56) "Call to undefined function linkedin_get_profile_fields()" ["file"]=> string(88) "/var/aegir/platforms/atrium-1-0-beta6/sites/all/modules/contrib/linkedin/linkedin.module" ["line"]=> int(119) }

Comments

socialnicheguru’s picture

Priority: Normal » Critical

it only happens when I goto to /user page.

socialnicheguru’s picture

Title: WSOD: can't find function linkedin_get_profile_fields » Fatal error: WSOD: can't find function linkedin_get_profile_fields

This error doesn't occur if I select 'tab' on admin/settings/linkedin
does occur if I select 'block' or 'hidden'.

bellesmanieres’s picture

StatusFileSize
new13.78 KB

Hi. Might be related with the tab still present in the menu router. Could you try replacing linkedin.pages.inc with the one attached (replace .txt with .inc) ?
(got to go now, so I won't follow up today)

socialnicheguru’s picture

no didn't work

bellesmanieres’s picture

StatusFileSize
new13.86 KB

Another try with all caches clearing. #1 and #2 make me think it has to with the tabs menu entry being still present when switching from the tab display.
Once the file is in place, don't forget to go to admin/settings/linkedin and change the display.

socialnicheguru’s picture

even after replacing the last file, I get the same error.

entering Tab on /admin/settings/linkedin is fine
entering Block gives me a white screen and same exact error

janwalhof’s picture

I get the same error: (after hit tab to show linkedin profile).

Fatal error: Call to undefined function linkedin_get_profile_fields() in /www/x/y/z/mysite.nl/public_html/sites/all/modules/linkedin/linkedin.module on line 183

I tried the attachments @3 and #5 without result.

Regards,
Jan Walhof

bellesmanieres’s picture

Status: Active » Fixed

Should be be fixed by new version.

Brian Keller-Heikkila’s picture

The new version does not work for me. When I click on "Login using LinkedIn" I get the same Call to undefined function linkedin_get_profile_fields() in /var/www/html/.../sites/all/modules/linkedin/linkedin_profile/linkedin_profile.module on line 96

I notice it's a different line now, but same error message. I tried flushing cache but that did not help.

bellesmanieres’s picture

Status: Fixed » Active

Reopening this.
1. Did you try uninstalling and re-enabling all submodules ?
2. Are you using a standard Drupal install (I see SocialNicheGuru is using Atrium, there might something there, even if it is unlikely) ?

entrepreneur27’s picture

I am having a similar problem. I just installed this module because it looks great. If I try and login or if I try and go to "My account" I get this message:

Fatal error: Call to undefined function linkedin_get_profile_fields() in /home/username/public_html/develop/sites/all/modules/linkedin/linkedin_profile/linkedin_profile.module on line 96

I am using the latest Acquia distribution, but I have quite a few contrib. modules including content profile and login toboggan.

deltab’s picture

I have Content Profile, Realname, Realname Generate, Content Profile Tokens and Panels along with LinkedIn module. On the first install, it worked fine for me. On reinstall, the same error as reported above.

Disabling all the other profile related modules does not help. I tried deleting all LinkedIn fields from database and re-installing. That did not work either.

socialnicheguru’s picture

I filed another issue because I noticed that I am getting a similar error caused in a sub module of linkedin. http://drupal.org/node/950140

maddentim’s picture

Hello. Having some weirdness with this after I tested posting a status update to linkedin. Then when I went back to the url didn't work. Not for the pathauto url, but the clean url "node/nid". Drush also got hung up and wouldn't work. Just a WSOD or occassionally, the fatal error "call to undefined function linkedin_get_profile_fields".

Looking at where this error is called on line 116 of the linkedin.inc file, the arguments seem wrong.

      $id = linkedin_get_profile_fields($account->uid, array('id'), TRUE);

What is array('id'), TRUE? Should it be array('id' => TRUE) or just array('id') or really just nothing? The second function of the argument is $fields = array() and is used to hold the fields we want to get from linkedin. I am thinking that we are requesting the 'id', so we should ditch the ", TRUE". I am going to see if this works better. Anyone know what is going on here? Am I on the right track?

EDIT: This didn't fix the issue, but I still think it looks wrong.

maddentim’s picture

Now I am looking at the value stored in the drupal variable table called linkedin_profile_user_page_linkedin_fields
Somehow, some of the in the array fields are duplicated. Once that stops you start getting a string followed by an integer... Something looks afoul. Will look at it further.

a:27:{s:10:"first-name";s:10:"first-name";s:9:"last-name";s:9:"last-name";s:8:"headline";s:8:"headline";s:8:"location";s:8:"location";s:8:"industry";s:8:"industry";s:7:"summary";s:7:"summary";s:11:"specialties";s:11:"specialties";s:9:"interests";s:9:"interests";s:11:"picture-url";s:11:"picture-url";s:18:"public-profile-url";s:18:"public-profile-url";s:2:"id";i:0;s:6:"honors";i:0;s:16:"num-recommenders";i:0;s:20:"member-url-resources";i:0;s:9:"positions";i:0;s:10:"educations";i:0;s:8:"distance";i:0;s:14:"current-status";i:0;s:24:"current-status-timestamp";i:0;s:15:"num-connections";i:0;s:22:"num-connections-capped";i:0;s:12:"associations";i:0;s:13:"phone-numbers";i:0;s:11:"im-accounts";i:0;s:16:"twitter-accounts";i:0;s:13:"date-of-birth";i:0;s:12:"main-address";i:0;}
maddentim’s picture

This is ok I believe. The values have i:0 are not selected.

spiderglow’s picture

Im having the same problem. Suscribing

janwalhof’s picture

Still (#7) I'm having the same problem. It's a pitty. Subcribing

maddentim’s picture

see here: http://drupal.org/node/950140#comment-3681174

The solution suggested here may help.

bellesmanieres’s picture