Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedCommenting 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;
}
Comment #2
Nick Fedchik CreditAttribution: Nick Fedchik commentedI had the same problem (user/me/affiliate menu link)
Just set up admin permissions for another user and solve the problem.
Comment #3
bojanz CreditAttribution: bojanz commentedIt'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.
Comment #4
bojanz CreditAttribution: bojanz commentedSo...
Comment #5
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedok, 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.
Comment #6
bojanz CreditAttribution: bojanz commentedI primary need patches converting old lists to use Views (and exposing affiliate tables to views).
Comment #7
dave.hussey CreditAttribution: dave.hussey commentedwe don't use views. admin account can't access the affiliate center, we used another account to do our menus... still an issue