Here is the Notice I get when I access the /my.site/user page :
Notice : Undefined variable: user dans commerce_addressbook_profile_page_access() (ligne 161 dans /my.site/sites/all/modules/commerce_addressbook/commerce_addressbook.module).
Notice : Trying to get property of non-object dans commerce_addressbook_profile_page_access() (ligne 161 dans /my.site/sites/all/modules/commerce_addressbook/commerce_addressbook.module).
Notice : Undefined variable: user dans commerce_addressbook_profile_page_access() (ligne 161 dans /my.site/sites/all/modules/commerce_addressbook/commerce_addressbook.module).
Notice : Trying to get property of non-object dans commerce_addressbook_profile_page_access() (ligne 161 dans /my.site/sites/all/modules/commerce_addressbook/commerce_addressbook.module).
Notice : Undefined variable: user dans commerce_addressbook_profile_page_access() (ligne 161 dans /my.site/sites/all/modules/commerce_addressbook/commerce_addressbook.module).
Notice : Trying to get property of non-object dans commerce_addressbook_profile_page_access() (ligne 161 dans /my.site/sites/all/modules/commerce_addressbook/commerce_addressbook.module).
It also happens when I create a new user, but I don't get the error with administrator account.
I don't know if there is anything more I could provide to help.
Thank you
Comments
Comment #1
vregouby CreditAttribution: vregouby commentedComment #2
vegtabill CreditAttribution: vegtabill commentedGreetings,
I ran into this tonight myself. My first guess was that maybe the function
commerce_addressbook_profile_page_access($account, $profile_type)
was missing a "global $user;" declaration. I tried adding it, and it seems to have solved the immediate problem. The Java dev in me cringes at the idea of fixing something with a global declaration, but it may well be the culprit. There could well be a better solution, and I gladly defer to more informed parties.In any event, perhaps this will be useful. I hope that is the case,
veg
Comment #3
bojanz CreditAttribution: bojanz commentedCommitted a fix.
Yes, the global was missing. It's a bit icky, but that's how Drupal 7 works.
Comment #4
rfulcher CreditAttribution: rfulcher commentedI have this same issue. Can you explain where you would declare the variable so that I can fix this?
Thanks
Comment #5
bojanz CreditAttribution: bojanz commentedJust download the -dev release.
Comment #6.0
(not verified) CreditAttribution: commentedAdd the information about no error message with the administrator account