Feature No Code Attached Yet
avatar brianteeman
brianteeman
2 Aug 2024

The Joomla content plugin has an option to send an email to admin users when a new article is submitted via the frontend

This needs to be converted to use the mail templates do that it can be customised and styled just as all other emails sent by Joomla. Currently its just a plain text email

avatar brianteeman brianteeman - open - 2 Aug 2024
avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Aug 2024
avatar chmst chmst - change - 10 Aug 2024
Labels Added: Feature
avatar chmst chmst - labeled - 10 Aug 2024
avatar coolcat-creations
coolcat-creations - comment - 8 Oct 2024

@LadySolveig can you direct me on which steps to take to solve this?

avatar Pinkeltje
Pinkeltje - comment - 11 Oct 2024

I think this entire block should be removed from content plugin Joomla.php so that action log mail template is used.

 // Messaging for new items

       $default_language = ComponentHelper::getParams('com_languages')->get('administrator');
       $debug            = $this->getApplication()->get('debug_lang');

       foreach ($users as $user_id) {
           if ($user_id != $user->id) {
               // Load language for messaging
               $receiver = $this->getUserFactory()->loadUserById($user_id);
               $lang     = Language::getInstance($receiver->getParam('admin_language', $default_language), $debug);
               $lang->load('com_content');
               $message = [
                   'user_id_to' => $user_id,
                   'subject'    => $lang->_('COM_CONTENT_NEW_ARTICLE'),
                   'message'    => sprintf($lang->_('COM_CONTENT_ON_NEW_CONTENT'), $user->get('name'), $article->title),
               ];
               $model_message = $this->getApplication()->bootComponent('com_messages')->getMVCFactory()
                   ->createModel('Message', 'Administrator');
               $model_message->save($message);
           }
       }
avatar brianteeman
brianteeman - comment - 11 Oct 2024

Why would you use the actionlog template. This is nothing to do with that

avatar alikon alikon - change - 14 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-14 09:51:07
Closed_By alikon
avatar alikon alikon - close - 14 Oct 2024
avatar alikon
alikon - comment - 14 Oct 2024

please test #44243

Add a Comment

Login with GitHub to post a comment