SOLDED: Set GJ "Group Logo Default" to creator's avatar at new group creation.

1 month 4 weeks ago #337415 by krileon
Enable debug mode and maximum error reporting in Joomla global configuration. Once done provide the full callstack for the 500 error. That will tell us exactly where it's coming from instead of just guessing as I do not see how the recent change for profile avatar default logo could possibly be causing your auto action to error.


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.

1 month 4 weeks ago - 1 month 4 weeks ago #337416 by NFA
Good proposal, okay, here comes the output:
24-02-29 16:31:44 https:/example.com/aanpassen/actie-aanmaken-wijziggen/groups/save?return=aHR0cHM6Ly9zdG9waGV0LnN0b3BoZXJzZW50dW1vcmVuLm5sL2FhbnBhc3Nlbi9hY3RpZS1hYW5tYWtlbi13aWp6aWdnZW4vbXlncm91cHM=
Fatal error: Cannot redeclare clean() (previously declared in /home/example/example.com/components/com_comprofiler/plugin/user/plug_cbautoactions/library/CBAutoActions.php(110) : eval()'d code:8) in /home/example/example.com/components/com_comprofiler/plugin/user/plug_cbautoactions/library/CBAutoActions.php(110) : eval()'d code on line 8

Where the complete CP AutoActions PHP code was exactly the 4 lines simple code you provided for testing.

I don't see any additional stack-trace. Normally those are also sent to my by mail, so I guess this is all error reporting I have?!

And I still don't see any forge.joomlapolis.com/issues/9370 implementation/change

Please Log in to join the conversation.

1 month 4 weeks ago #337418 by krileon
It looks like you're creating a global scoped function called "clean" in your custom PHP. That function appears to already exist. You may want to instead use anonymous functions instead of adding to the global scope. See the below documentation on how to use anonymous PHP functions.

www.php.net/manual/en/functions.anonymous.php


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.

1 month 4 weeks ago - 1 month 4 weeks ago #337419 by NFA
Sorry, but the only code in that CB AutoAction custom PHP is the 4 lines of code you provided me in this ticket. When I turn off the AutoAction, the site works normal but also then I still see nothing from the forge.joomlapolis.com/issues/9370 implementation.

Please Log in to join the conversation.

1 month 4 weeks ago #337421 by krileon
Please PM backend super user login credentials and provide steps to reproduce your issue. I'm at a complete loss here. I'm unable to reproduce your issue.


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.

1 month 3 weeks ago - 1 month 3 weeks ago #337435 by NFA
Solved the HTTP 500 server crash ;-)

Turned out that even the fact that the 500 error after new GJ group creation could be stopped by turning off the CB Auto Action with the 4 line's code, the actual error was in another at the same time triggered CB AutoAction. These two turned on together, causes the 500.

In the second CB AutoAction PHP code, I had defined a function like:
function clean($string) {
  $string = str_replace(' ', '-', $string);
  $string = preg_replace('/[^A-Za-z0-9\-]/', '', $string);
  return preg_replace('/-+/', '-', $string);
}

According to the error, there must be another script having also a function called "clean". Looks like that, (maybe a GJ) code is called at the moment other AutoAction with the code below is executed at the same time?
$group = $variables['var1'];
$group->params()->set( 'about_content', 'TEST');
$group->set( 'params', $group->params()->asJson() );
$group->store();

Removing that function from the code and adding the <?php ?> around the remaining code of that CB AutoAction - PHP solved the crash problem.

Still not having the default logo magic from forge.joomlapolis.com/issues/9370 . I will first take some more time to investigate, or that is a GJ Template, CBprivacy, configuration or other issue and then add an update to this ticket.
 
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.188 seconds

Facebook Twitter LinkedIn