Skip to Content Skip to Menu

[#5047] Fatal error: cannot access empty property

9 years 9 months ago - 9 years 9 months ago #257753 by ninokorinteli
Hello, getting this message Fatal error: cannot access empty property and then path to the UserTable.php and line 290, attached screenshot and copy/pasted code from UserTable.php, below


288 public function bindThisUserFromDbArray( $arr, $oid = null ) {
289 foreach ( $arr as $kk => $v ) {
290 $this->$kk = $v;
291 }


I'm getting it after trying to update profile from the front end, there are image, video, audio, file and website fields which i leave empty before updating, and the same was when i was trying to remove value (image, file). i deleted and recreated new fields, as the previous fields came from older CB, but the issue remained. How to solve it? what's wrong?
thank you
Nino
Attachments:
Last edit: 9 years 9 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago - 9 years 9 months ago #257780 by krileon
Replied by krileon on topic Fatal error: cannot access empty property
Please see the below same topic.

www.joomlapolis.com/forum/255-developer-members-support/228056-cb-conditional-405-breaks-save-user-profile-with-error-500?start=6

The issue appears to be due to an invalid conditional. Please note calculated fields (fields with no edit display) should not be conditioned on profile edit. You'll need to review your conditions carefully and try disabling/enabling them 1 by 1 to see which specifically is causing it. Would be interesting in knowing which when you find it as it maybe a fixable issue.

I've added a bug ticket to see if I can track down and prevent this issue from happening in the future. Still unsure of the cause though as last topic did not report any further findings.

forge.joomlapolis.com/issues/5047


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.
Last edit: 9 years 9 months ago by krileon.

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

9 years 9 months ago #258339 by ninokorinteli
Replied by ninokorinteli on topic Fatal error: cannot access empty property
Hi,
It was not conditional, it was validation in the integer field's parameters, i had 'minimum value allowed' set to 1956, so if left empty on update from the front end it would give error message. as soon as i set minimum value to 0 the issue disappeared.

Initially i went through conditioned fields turning conditional off/on, but it changed nothing, btw none of the fields had no edit display; then i unpublished conditional from plugin manager, went to front end and tried to update profile again, and that's when that validation thing became visible - (tab in red, integer field in red and msg asking to input valid value), with conditional on that would not happen, it just was giving fatal error: 'cannot access empty property' message.

then i turned conditional back on and everything works fine so far

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #258367 by krileon
Replied by krileon on topic Fatal error: cannot access empty property
Strange, the form shouldn't even post if the input doesn't validate. The integer field with a minimum set, was it conditioned to hide when this was happening? I was unable to confirm just minimum value requirement as the form stops completely. Are you using CB Profile Pro by chase? As it's known to conflict and cause problems sometimes due to its custom profile edit/view and registration output.


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.

9 years 9 months ago - 9 years 9 months ago #258405 by ninokorinteli
Replied by ninokorinteli on topic Fatal error: cannot access empty property
Yes, right, the integer field was conditioned against the other field, actually the only case when it would remain empty on update would be when it was hiding according to condition. (see attached).
im not using CB Profile Pro by chase
Attachments:
Last edit: 9 years 9 months ago by ninokorinteli.

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

Moderators: beatnantkrileon
Powered by Kunena Forum