Skip to Content Skip to Menu

CBConditional file triggers PHP Fatal Error (allowed memory exhausted) when users with many profile fields update their profile

  • zerodd
  • zerodd
  • OFFLINE
  • Posts: 14
  • Thanks: 2
  • Karma: 2
10 years 8 months ago - 10 years 8 months ago #233736 by zerodd
Dear,

We use cbconditional plugin to manage the tabs of the user profile during registration and profile view/edit. We have different user types based on the value of one field ('usertype'), and do all kinds of conditional showing/hiding of fields and tabs on the profile and the registration based on this value.

Now, there seems to be a problem with the user type that has most tabs+fields visible+editable: when such a user goes to his own profile, goes in edit mode, and submits the form to update his profile, we get a PHP fatal 'memory exhausted' error:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in <span>/</span>var<span>/</span>www/html/components/com_comprofiler/plugin/user/plug_cbconditional/cbconditional.class.php on line 71

Changing the allowed memory in php.ini or with an ini_set does not make a difference (we tried both raising the limit to 128/256/...MB and setting to -1), so my best guess is a MySQL query going wrong or something when there's too many fields.

Haven't been able to make much more sense of it by looking / echo'ing inside the file mentioned in the error though.

(we use CB 1.9 with CBConditional plugin version 3.0.8)

Kind regards and thanks in advance. If you would like to have a look at our CB field configuration, feel free to ask and we'll get you an admin account.
Last edit: 10 years 8 months ago by zerodd.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68605
  • Thanks: 9108
  • Karma: 1434
10 years 8 months ago #233740 by krileon
The more fields you condition the heavier it's going to get. So for example if you condition 100 fields at once that's a lot to process though.

With that said there is some fields that can cause memory loop issues. For example never condition a field that has no profile edit display with a profile edit condition. An example scenario is the CB Progress Field; if you condition it on Profile Edit it'll cause problems and should only be conditioned in Profile View.

Please also note you're using an out of date CB Conditional so you may be experiencing an already fixed bug. Please upgrade to 3.0.12 (latest).


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: zerodd

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

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn