2

I upgraded to 5.56.0 from 5.55.2, run in Joomla 3.10, and power with php 7.4.32 and apache httpd 2.4.54. The very next cron run produced "Error". Running by hand also produces "Error".

There are no entries in access_log or error_log. Successive issuing of the cli command may produce warnings:

root@host:/var/log/httpd# php .../administrator/components/com_civicrm/civicrm/bin/cli.php -u user -p pw -e Job -a execute
Errorroot@host:/var/log/httpd# php .../administrator/components/com_civicrm/civicrm/bin/cli.php -u user -p pw -e Job -a execute
WARNING: Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\ContactPreSaveSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\ContributionPreSaveSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\CustomFieldPreSaveSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\CustomGroupPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\OptionValuePreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
Errorroot@host:/var/log/httpd#  php .../administrator/components/com_civicrm/civicrm/bin/cli.php -u user -p pw -e Job -a execute
Errorroot@host:/var/log/httpd#  php .../administrator/components/com_civicrm/civicrm/bin/cli.php -u user -p pw -e Job -a execute
Errorroot@host:/var/log/httpd#

What should we fix to remedy this issue?

5
  • Issue created here: lab.civicrm.org/dev/core/-/issues/4035
    – thoni56
    Dec 21, 2022 at 12:11
  • I have applied civicrm-5.57.0 and get the same uninformative message: Error. Occasionally, I get the WARNING messages too. Jan 5, 2023 at 11:27
  • Perhaps you could accept my answer, now that 5.57.1 has been out for a while.
    – thoni56
    Jun 14, 2023 at 8:54
  • I accept @thoni56's answer. See lab.civicrm.org/dev/core/-/issues/4035 for details. Jun 15, 2023 at 11:18
  • Thanks, on StackExchange sites you do that by pressing the checkmark on the left of the answer ;-)
    – thoni56
    Jun 15, 2023 at 11:38

2 Answers 2

2

This is caused by this bug introduced in 5.56. The related pull request fixes this.

We will have to watchout when updating until the PR has been introduced.

2
  • 1
    The fix will be included with 5.57.1 If you need it fixed before then, it's a simple change. See the PR.
    – Aidan
    Jan 11, 2023 at 14:08
  • Yes, I can confirm that it is a very easy 2 or 3 lines fix.
    – thoni56
    Jan 11, 2023 at 18:41
0

It might be from some bad smarty code in a template. You can try installing https://civicrm.org/extensions/smarty-message-template-error-handler or applying this patch which is roughly the same thing that might make the error more visible.

Otherwise you could try running the job with cv and see if that gives a different error.

I assume you've checked all the civi logs too.

4
  • I tried to use cv to run the command but encountered this problem: github.com/civicrm/cv/issues/139. Are they related?
    – thoni56
    Dec 21, 2022 at 12:23
  • 1
    I installed Smarty, but it did not help. We do not use email templates. I installed CV and got the same Factory.php error as @thoni56. civi logs does not seem to show anything related to this error. There are entries in them, but all are timestamped well away from my job execute error. Dec 21, 2022 at 12:29
  • There is an incompatibility between how joomla does upgrades for extensions and civi where it doesn't delete the whole civi folder and so some old files get left behind that can cause problems. Maybe this is the issue. See the last paragraph at docs.civicrm.org/sysadmin/en/latest/upgrade/joomla/…. Are you able to replace the civicrm folder with one from a fresh install and see if that fixes it?
    – Demerit
    Dec 21, 2022 at 15:52
  • 1
    I moved the civicrm directory to the side and did a new install/upgrade to 5.56.1 so all files in ROOT/administrator/components/com_civicrm/civicrm are now fresh. Same problem.
    – thoni56
    Dec 22, 2022 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.