[SOLVED] Auto Actions 8.0.0 and Fatal error: Allowed memory size of xxx bytes exhausted

5 years 1 month ago - 5 years 4 weeks ago #311057 by philiplardner
Hi,

I've just updated my CB installation with the latest releases and am getting the following error mesage when an AutoAction is executed:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /home/ihpaie/public_html/components/com_comprofiler/plugin/libraries/CB/Plugin/AutoActions/CBAutoActions.php on line 431

The Auto Action sends an email following a user profile update by an administrator.
Auto Action: Type=Email - Trigger=onAfterUpdateUser

Changes to the user's profile get saved correctly but the Auto Action email does not get sent.

I tried increasing my server's memory limit from 128Mb to 256Mb and the 512Mb, but the error persists.

Unpublishing the Auto Actions plugin stops the Fatal Error occurring.

Any ideas?

Phil.

PHP 7.1
Joomla 3.9.3
CB 2.4.1
CB Auto Actions 8.0.0+build.2019.02.22.14.48.52.d1c4198c8

Please Log in to join the conversation.

5 years 1 month ago #311063 by krileon
The line it's running out of memory on doesn't make much sense. Do you have any other auto actions configured? You said unpublishing CB Auto Actions makes it go away, but does unpublishing that specific auto action resolve the issue? If not do you have any other auto actions acting before/after profile update? Did the conditions for your auto action migrate correctly when updating to 8.0.0? Do you have format functions enabled under Parameters or for your conditions? If so are you actually using the format functions? If not be sure to disable them.

PHP 7.1

I recommend updating to PHP 7.2 (not 7.3 as it has not been tested with CB yet).


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 to join the conversation.

5 years 1 month ago #311072 by philiplardner
Thanks Krileon, disabling Format Functions under the Conditions tab seems to have cured the problem.

Looks like I need to re-learn how to use the updated plugins properly! Apologies.

Phil.

Please Log in to join the conversation.

5 years 1 month ago #311099 by krileon
Were you using any formation functions in your condition? What conditions are you using? They shouldn't be causing memory issues.


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 to join the conversation.

5 years 1 month ago #311146 by philiplardner
Hi Kyle,

Here are the settings for the AutoAction (which now works - I have added notes showing the settings that caused the error to appear):

Type: Email
Trigger: onAfterUpdateUser
Conditions Tab:
Field: Value
Custom Value: [cb:parse function="time" ][cb_insuranceexpirydate][/cb:parse]
Translate: off - Format Functions: off - Content Plugin: off
NOTE: The above parameter settings do not cause a memory error, but when Format Functions was selected (On) by default, the memory error message appears
Operator: Greater Than
Value: [cb:parse function="time" ][cb:date format="Y-m-d" /][/cb:parse]
Translate: off - Format Functions: off - Content Plugin: off
Action: send an email
Output: None
Uses Tab:
Total Uses: 0
Total Uses Timeframe: Forever
Per User Uses: Custom
Custom Uses: 0
Per User Timeframe: Forever
Parameters Tab: [NOTE - all left at default settings]
Reload User: No
Exclude Users: blank
Translate: Yes
Substitutions: Yes
Format Functions: No
Content Plugins: No
References: none selected
Loop: -select variable-
Debug: No

Please Log in to join the conversation.

5 years 1 month ago #311153 by krileon
Ok, you're using a format function in your auto action. In both the condition and in the action. Turning off format functions will cause that to behave differently. Your substitution seams to have an extra space though. Try the following.

From:
[cb:parse function="time" ][cb:date format="Y-m-d" /][/cb:parse]

To:
[cb:parse function="time"][cb:date format="Y-m-d" /][/cb:parse]

I've tested the above as working fine, but the extra space in your current usage may break the parsing but it really shouldn't. Aside from that I'm not sure what to suggest as the time format function seams to be working fine.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.221 seconds

Facebook Twitter LinkedIn