First of all this question has also been posted in the AcyMailing forum. A few weeks ago (it was still on Joomla 5.1.x) the following code worked in prod without issues:
...
namespace NXD\Component\%COMPONENTNAME%\Administrator\Model;
\defined('_JEXEC') or die;
use AcyMailing\Classes\ListClass;
...
It is part of a Custom Form Field to select from the list of all available AcyMailing Lists.
It looks like after the recent AcyMailing Update 9.9.2 (idk) this code stopped working and throwing this error: Class AcyMailing\Classes\ListClass" not found
Same happens in the frontend for the UserClass (where a user gets registered onto a list after an event registration).
...
use AcyMailing\Classes\ListClass
...
I'm facing this issue on prod aswell as on staging (same server PHP 8.3.12 on a subdomain). ModSecurity aswell as the server Logs (PHP) are not showing any error at all (not even the Error 0 mentioned above).
On my Local Machine with MAMP Pro (MacOS) the same (page) version/build works without issues (copied & installed using akeeba).
I've also disabled .htaccess on my dev / staging subdomain which also did not changed a lot.
One interessting thing, From time to time the error does NOT get thrown (on Staging) whne doing a forced refresh. For example:
- Opening first => error
- Forced Refresh (5-10 times) always error
- Waiting a few minutes (5 min for example) > Doing Forced refresh = no error
Joomla Config:
- GZIP Enabled & disabled no change
- Cache: Disabled
- No Proxy
- No .htaccess
- Tried enabled / disabled SEF (but its not only frontend related so...)
Anyone any hints?
Edit based on Sharky's answer:
...
$acyHelper = JPATH_ADMINISTRATOR . '/components/com_acym/helpers/helper.php';
if (!include_once($acyHelper)) {
$msg = 'COM_COMPONENT_FIELD_ACYM_NOT_FOUND_ERROR';
Factory::getApplication()->enqueueMessage(Text::_($msg), 'warning');
return false;
}
...