2

========== Updates ==========

UPDATE1:

I found in the CiviCRM 5.47.0 release notes:

(REF) APIv4 - Deprecate and stop using PreSaveSubscriber (22648)

The only code I've found that calls PreSaveSubscriber is in the CiviCRM cache folder, media/civicrm/templates_c:

CachedCiviContainer.73d843c61bfbb34674c0ff02ce48cf2d.php
CachedCiviContainer.ef856f09bf0c4699a47bf7b31ddccbf6.php

These PHP files in the cache were generated today just a while ago when I accessed the site.

What is CachedCiviContainer and why is this code calling a deprecated function?

UPDATE2:

I cleared the Civi cache, logged out of Joomla admin, and then logged back in.

A new CachedCiviContainer file was generated in the cache folder, and it too contains code calling PreSaveSubscriber.

It appears each time I log into Joomla a new CachedCiviContainer is created in the cache folder.

CachedCiviContainer is generated by Symfony Dependency Injection Component.

UPDATE3:

I just did a test and was not able to precipitate the "PreSaveSubscriber is deprecated" warnings, so I logged out, cleared the website's cookies, and logged back in. After this, I saw the warnings again. The warnings seem to only appear once... possibly once per day, unless I clear cookies.

========== Original Post ==========

Before I started the upgrade, Civi reported:

enter image description here

The site is using Joomla 3.10.5. I upgraded Civi from 5.45.1 to 5.47.2. I'm now seeing this sometimes when viewing system status page (not always):

Deprecated: Use of APIv4 'PreSaveSubscriber' is deprecated. 'Civi\Api4\Event\Subscriber\ContactPreSaveSubscriber' should be removed (Contact::getFields). Caller: ::call_user_func_array in /var/www/vhosts/XXXXX.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 1059

Deprecated: Use of APIv4 'PreSaveSubscriber' is deprecated. 'Civi\Api4\Event\Subscriber\CustomFieldPreSaveSubscriber' should be removed (CustomField::get). Caller: ::call_user_func_array in /var/www/vhosts/XXXXX.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 1059

Deprecated: Use of APIv4 'PreSaveSubscriber' is deprecated. 'Civi\Api4\Event\Subscriber\CustomFieldPreSaveSubscriber' should be removed (CustomField::get). Caller: ::call_user_func_array in /var/www/vhosts/XXXXX.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 1059

Also seeing this:

enter image description here

thanks

1
  • 1
    did you ever find a solution to the preSaveSubscriber issue? Super hard to see the real issues in the error log when it's littered with these. Thank you!
    – MtnPavlas
    Jun 13, 2022 at 21:50

3 Answers 3

1

the schedule job failures:

Fetch Bounces - Check the Mail accounts(Administer >> CiviMail >> Mail Accounts) are configured correctly. You can disable the scheduled job if it's not required.

Process Inbound Emails - Check the Mail accounts(Administer >> CiviMail >> Mail Accounts) are configured correctly. You can disable the scheduled job if it's not required.

Mail Reports - It requires report id to be passed, I guess you are not using this functionality so you can turn this scheduled job off.

3
  • jcalvert doesn't say anything other than that they did an upgrade so I'd assume that there weren't these errors before and did want these scheduled jobs so the question is what has changed with the upgrade. Of course they could not be telling the whole storey :-)
    – Mick Kahn
    Mar 18, 2022 at 11:29
  • 1
    I think the Scheduled Jobs failure in core is a new feature so perhaps they are showing now due to the upgrade
    – petednz - fuzion
    Mar 18, 2022 at 18:39
  • I actually don't know if we need these scheduled jobs. Yes, I think the failure notification is a new thing. I think best to disable these jobs for now. Thanks. I'm still looking for help on the warnings, "Deprecated: Use of APIv4 'PreSaveSubscriber' is deprecated."
    – jcalvert
    Mar 18, 2022 at 20:55
0

Just started getting the same problem on an upgraded joomla site PHP 7.4.30 Joomla! 3.10.10 Stable CiviCRM 5.37.2

Error occurs when sending a Flexmail/Mosaico bulk mailing

1
  • I have not seen this error since I originally reported it. I am now running: Joomla 3.10.8, CiviCRM 5.50.3, PHP 7.4.27, MySQL 5.5.5-10.5.13-MariaDB. One word of advice: when you are upgrading CiviCRM, do it one release version at a time – don't jump to the latest version.
    – jcalvert
    Jul 17, 2022 at 2:23
0

Thanks to an advice from our friends at Fuzion, I deleted the following files:

<your_server_path_to_joomla_root>/administrator/components/com_civicrm/civicrm/Civi/Api4/Event/Subscriber/CustomFieldPreSaveSubscriber.php
<your_server_path_to_joomla_root>/administrator/components/com_civicrm/civicrm/Civi/Api4/Event/Subscriber/ContributionPreSaveSubscriber.php
<your_server_path_to_joomla_root>/administrator/components/com_civicrm/civicrm/Civi/Api4/Event/Subscriber/ContactPreSaveSubscriber.php

Where <your_server_path_to_joomla_root> is something like /home/your_user_account/public_html or /home/your_user_account/www on a Linux server

You may also look in the <your_server_path_to_joomla_root>/media/civicrm/templates_c/ for any cache files and wipe them out (if you don't do this after every upgrade... which you should)

No more of these pesky errors : )

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.