Because the admin cannot access the affiliate center, I am also unable to create a menu link to the aff center:

The path 'user/me/affiliate' is either invalid or you do not have access to it.

I even don't have access if I give myself the affiliate role. I think it's Drupal practice that the admin has access to everything.

Comments

JurriaanRoelofs’s picture

Status: Active » Needs review

Commenting out or removing the following code in uc_affiliate2.module#269 will give you the ability to add menu items to the affiliate center, as well as view all pages in the aff center:

// The admin can't be an affiliate.
if($account->uid <= 1) {
return FALSE;
}

Nick Fedchik’s picture

I had the same problem (user/me/affiliate menu link)
Just set up admin permissions for another user and solve the problem.

bojanz’s picture

It's a workaround, because some uc_affiliate2 queries that join the permission table fail with admin.
After the UI has been converted to use Views (which I could use help with), then this will change.

bojanz’s picture

Status: Needs review » Postponed

So...

JurriaanRoelofs’s picture

ok, what sort of help do you mean? I can do some testing if you want, not sure if I can do much for code as Im not at all familiar with Views APIs of the affiliate module code.

bojanz’s picture

I primary need patches converting old lists to use Views (and exposing affiliate tables to views).

dave.hussey’s picture

we don't use views. admin account can't access the affiliate center, we used another account to do our menus... still an issue