Bummer, just installed this mod and immediately received the following error on my "Access control" administration page at http://../admin/user/access:

* warning: Invalid argument supplied for foreach() in /home/theunpav/public_html/jjusa/modules/nodeprofile/nodeprofile.module on line 285.
* warning: Invalid argument supplied for foreach() in /home/theunpav/public_html/jjusa/modules/nodeprofile/nodeprofile.module on line 285.

FWIW I had nodeprofile working fine, without this error, and it only (or first) occurred when I installed userpoints.

I can't tell what priority this will be or what harm (or not) it will cause later, so leaving as normal priority for now. Meanwhile ideas/suggestions appreciated!

Thx KV

Comments

jredding’s picture

Project: User Points » Node Profile
Version: 5.x-3.4 » 5.x-1.3
Component: Code: userpoints API » Code
Status: Active » Postponed (maintainer needs more info)

nodeprofile is the module displaying an error here not userpoints.

the function in question for nodeprofile is

unction nodeprofile_user_admin_perm_submit($form_id, $form_values) {
  $settings = nodeprofile_get_settings();
  $user_roles = user_roles(TRUE, 'register for role');
  if (isset($settings['register_roles'])) {
    foreach (array_filter($settings['register_roles']) as $type => $type_settings) {
      foreach ($type_settings as $role_id => $status) {
        if (!isset($user_roles[$role_id])) {
          // Remove irrelevant setting.
          unset($settings['register_roles'][$type][$role_id]);
        }
      }
    }
    nodeprofile_set_settings($settings);
  }
}

Nothing comes to mind for a conflict.

fago’s picture

Status: Postponed (maintainer needs more info) » Fixed

that's already fixed, upgrade to the latest release or dev snapshot.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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