SOLVED: listcsv plugin issue

Status
Not open for further replies.

dimoss

Well-Known Member
Joomla 4.2.9
Fabrik #4 Gamma 3
Cassiopeia
vanilla J & F installation

Hi,

i know that listcsv plugin has not been tested yet in F4. However i tried to use it to send an email after a frontend csv import using the following :

Code:
use Joomla\CMS\Factory;
$user = Factory::getUser();
$name = $user->name;
$d = date("Y-m-d H:i:s");
$config = JFactory::getConfig();
$to = "xxxxxxx@xxxx.com";
$subject = "Import";
$msg = $name." uploaded matches on ".$d;
$res = FabrikWorker::sendMail(
   $config->get('emailfrom'),
   $config->get('fromname'),
   $to,
   $subject,
   $msg
);

The code is evaluated and run after the import is complete (Import Complete PHP Code).

I get the following error and nothing is imported:

Call to undefined method PlgFabrik_ListListcsv::getFormModel()

If I disable the plugin the import works fine.

Thanks in advance for any help provided.
 
It's
$config->get('mailfrom'), not emailfrom

JFactory::getConfig is still doing but better use Factory::getConfig

BTW: sendMail is logging error in #__fabrik_logs
 
Last edited:
Funny that it was working in F3 as 'emailfrom'
I think this was by chance: It's not set, so in J!3 it takes the config (the real one;)), in J!4 it throws an error/log.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top