Download & Extend

Fatal error when content profile deactivated while realname configured to look at its fields

Project:RealName
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I was using Content Profile to define first and last names, as well as other fields. I decided to turn off Content Profile and revert back to the core Profile module. After deselecting the Content Profile module and saving my changes, I get the following error on all pages of the site:

Fatal error: Call to undefined function content_profile_load() in C:\htdocs\drupal_sites\sites\all\modules\realname\realname_content_profile.inc on line 12

Recovery is fairly straight forward - I edit the system table to reactivate content profile, edit the RN configuration to point to core Profile and then deactivate Content Profile again.

Should the call to content_profile_load be wrapped in a function_exists() check?

Code as it is:

$profile = content_profile_load($type, $account->uid);

Code as it might be:

  if (function_exists('content_profile_load')) {
  $profile = content_profile_load($type, $account->uid);
  }

Comments

#1

Status:active» fixed

I did it in a different place but the result is the same. Thanks for finding this.

#2

Status:fixed» closed (fixed)
nobody click here