Tried installing this module on 3 different machines, same result. I enabled the module, configured the permissions but not seeing anyway to add the widget to a node. The module works on a plain install of Drupal 7. What could be preventing
the configuration interface from showing. I tried navigation directly to the URL : ....../#overlay=admin/config/user-interface/plus1 I get a 'You are not authorized to access this page.' error. I tried changing some permissions but couldn't get access to the plus1 page.

Thanks

Comments

Everett Zufelt’s picture

Priority: Major » Critical

Also using on D7 and get access denied on admin/config/user-interface/plus1

Noting about Plus1 on admin/config or vertical tabs of content types.

Marking as critical, as module appears completely useless w/o ability to configure.

miked’s picture

Component: Code » User interface

Same as #1 - this is a show stopper in our conversion

Everett Zufelt’s picture

If I were to guess the problem might be somewhere in (7.x-1.x):

  $items['admin/config/user-interface/plus1'] = array(
    'title' => 'Plus 1',
    'description' => 'Allows readers to vote on content.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('plus1_settings'),
    'access callback' => 'plus1_user_access',
    'access arguments' => array('administer the voting widget'),
    'file' => 'plus1.admin.inc',
  );

  return $items;
}

/**
 * Custom access function, works with array of permissions.
 */
function plus1_user_access() {
  global $user;
  $permissions = func_get_args();
  if ($user->uid == 1) {
    return TRUE;
  }
  foreach ($permissions as $perm) {
    if (user_access($perm))
      return TRUE;
  }
}
Everett Zufelt’s picture

It doesn't look like there is any reason for the custom user_access function at all.

miked’s picture

Thanks, Everett, for pointing me in the right direction! As a crude test, if I force the function to return TRUE Plus1 now shows up in the Configuration menu.

I'll dig deeper and post whatever I find

guldi’s picture

I'm not expiriencing this problem. Possibily because uid = 1 does not have this issue?

miked’s picture

Yes - uid 1 is checked for in the plus1_user_access function in plus1.module and returns TRUE if found.

So far, I agree with Everett - don't understand the purpose of a custom function for this and it's definitely flawed. Working on a simple solution.

thoughtcat’s picture

Same problem here - I'm not even seeing the Plus1 buttons when logged in as user1.

malancheril’s picture

I get the configuration page to show up, I check the content types I want to add it to and it won't show up at all in D7. I've tried this with and without Display Suite installed.

GuyPaddock’s picture

It looks like the permission name changed from administer the voting widget to administer the plus1 voting widget. That may explain why the callback isn't working.

Looking at the other menu items, it appears that the custom callback is there to grant access in cases where the user should be able to edit something if they have any of the named permissions.

GuyPaddock’s picture

It looks like the permission name changed from administer the voting widget to administer the plus1 voting widget. That may explain why the callback isn't working.

Looking at the other menu items, it appears that the custom callback is there to grant access in cases where the user should be able to edit something if they have any of the named permissions.

rogical’s picture

Status: Active » Closed (fixed)

seems fixed in the dev, I just tried, all be fine.

rogical’s picture

Issue summary: View changes

Updated message after trying Plus 1 on a plain vanilla install