Skip to Content Skip to Menu

A couple PHP Notices logged

  • krileon
  • krileon
  • ONLINE
  • Posts: 48547
  • Thanks: 8290
  • Karma: 1445
3 years 9 months ago #322935 by krileon
Replied by krileon on topic A couple PHP Notices logged
I'm not sure what to suggest then at this time without knowing more about what triggered it. As it stands something tried calling a function on a plugin that wasn't loaded is all we've got to go on. Do you have any plugins in CB > Plugin Management where Access is not set to Public? If so, which ones?

PHP Notice: Trying to get property 'email' of non-object in .../components/com_comprofiler/plugin/user/plug_cbautoactions/library/CBAutoActions.php(148) : eval()'d code on line 13

That looks like a code action issue. You're trying to access email of an object that doesn't have email on it. Looks like line 13 of your custom code. Suggest checking your email actions to see which could be doing this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
3 years 9 months ago #322937 by bascherz
Replied by bascherz on topic A couple PHP Notices logged
I don't use email auto actions at all, though I do call the Joomla mailer from code auto actions in a few of them. I checked the code on those and it's correct and tests correctly. The implication here may be that someone doesn't have an email address in their account (or it is invalid). I wondered about the line 13 reference. Wasn't sure what that referred to. Would be nice to know which AA it is, but I only have 3 that send emails. They all have "Everybody" access. I see one of them was using the onAfterUserConfirmation event (just changed to onAfterUserConfirm). I have wondered if that event provides access to the profile of the $user (as if they are logged in and active). I have certainly assumed it does. If not then that could be the issue (and I need another solution).

Bruce S - Vienna, VA

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48547
  • Thanks: 8290
  • Karma: 1445
3 years 9 months ago #322939 by krileon
Replied by krileon on topic A couple PHP Notices logged

I don't use email auto actions at all

Sorry, I meant to say to check your code actions trying to access email.

The implication here may be that someone doesn't have an email address in their account (or it is invalid).

It's erroring because the object you're accessing seams to sometimes not be an object at all or at least not an object you're expecting. You'd need to find which auto action is doing this then provide what trigger it's acting on and likely also the code you're trying to execute.

I wondered about the line 13 reference.

Copy your code to an editor that shows line number. Line 13 is where the error is happening.

I have wondered if that event provides access to the profile of the $user (as if they are logged in and active)

onAfterUserConfirmation does provide a user object as var1.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
3 years 9 months ago #322940 by bascherz
Replied by bascherz on topic A couple PHP Notices logged
Turns out line 13 of that confirmation-triggered AA has reference to an email address that is looked-up by one of my utility functions based on the zip code of the user confirming their registration.

onAfterUserConfirmation does provide a user object as var1.


I just changed the event to onAfterUserConfirm. Was that a mistake? Before that change I was using just $user->field (and still am). Will this work with onAfterUserConfirm or should I switch back to onAfterUserConfirmation and use the $var1 (or whatever the syntax is)?

Bruce S - Vienna, VA

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48547
  • Thanks: 8290
  • Karma: 1445
3 years 9 months ago #322952 by krileon
Replied by krileon on topic A couple PHP Notices logged

I just changed the event to onAfterUserConfirm. Was that a mistake? Before that change I was using just $user->field (and still am). Will this work with onAfterUserConfirm or should I switch back to onAfterUserConfirmation and use the $var1 (or whatever the syntax is)?

$user is set by CB Auto Actions and will always be a user object so it's save to use as long as your code doesn't override $user with something else.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: bascherz

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum