No Code Attached Yet
avatar brianteeman
brianteeman
31 Jul 2024

I spotted an option in com_contacts called custom reply. I thought it must be new as I dont remember seeing it before.

So I thought it might be for sending am email in response to a visitor using the contact form. No

Digging further it appears that it was a functionality available upto about joomla 1.6 but since removed and finally had an obsolete file removed related to this in 3.61

The only time that option is checked is here

if (!$contact->params->get('custom_reply')) {
$sent = $this->_sendEmail($data, $contact, $contact->params->get('show_email_copy', 0));
}

and if custom_reply is set to yes then the contact email doesnt get sent

So what is the purpose of this custom_reply option today

/me confused

avatar brianteeman brianteeman - open - 31 Jul 2024
avatar joomla-cms-bot joomla-cms-bot - change - 31 Jul 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Jul 2024
avatar brianteeman brianteeman - change - 31 Jul 2024
The description was changed
avatar brianteeman brianteeman - edited - 31 Jul 2024
avatar neehhaa06
neehhaa06 - comment - 1 Aug 2024

Hello? @brianteeman
would you be able to elaborate on what's issue you getting?
Thank you!

avatar brianteeman
brianteeman - comment - 1 Aug 2024

I dont know what more I can say

avatar Fedik
Fedik - comment - 1 Aug 2024

So what is the purpose of this custom_reply option today

I do not know for sure. But by looking in the code,

// Passed Validation: Process the contact plugins to integrate with other applications
$this->app->triggerEvent('onSubmitContact', [&$contact, &$data]);
// Send the email
$sent = false;
if (!$contact->params->get('custom_reply')) {
$sent = $this->_sendEmail($data, $contact, $contact->params->get('show_email_copy', 0));
}

The email can be send inside the event onSubmitContact, and set $contact->params->set('custom_reply', true) to prevent submission by the component.

avatar brianteeman
brianteeman - comment - 1 Aug 2024

But there is nothing in core that can actually act on this component option?

avatar Fedik
Fedik - comment - 1 Aug 2024

I did not found anything else.

Also as I see, in the contact parameters, User can set "Contact Form" to Show and "Custom Reply" to "Yes" the form will be shown but email will not be send (confusing behavior).

Well, yes, after removing the field descriptions the meaning of this parameter were lost.
I just checked 2.5:

COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC="Turns off the automated reply, allowing for Plugins to handle integration with other systems."

So, its purpose as I have wrote before, is to allow to plugin handle email sending.

avatar chmst
chmst - comment - 1 Aug 2024

It is from 14 years ago ;)

2.5.25
COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC="Turns off the automated reply, allowing for Plugins to handle
integration with other systems."

EDIT: young men are faster :D

avatar brianteeman
brianteeman - comment - 1 Aug 2024

So I propose either

  1. Remove this option completely
  2. Re-introduce that description

Thoughts - I guess 2 is the safest option

avatar brianteeman
brianteeman - comment - 1 Aug 2024

correction

it doesnt turn off the automated reply as there is no automated reply to turn off

avatar Fedik
Fedik - comment - 1 Aug 2024

Adding the description is a good idea.
It is probably may be in use, so we cannot remove it without breaking someone's website

avatar Fedik
Fedik - comment - 1 Aug 2024

it doesnt turn off the automated reply as there is no automated reply to turn off

Maybe wrong wording, it just means that Joomla will not send email on its own, when the form submited.

avatar brianteeman brianteeman - change - 1 Aug 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-08-01 13:31:16
Closed_By brianteeman
avatar brianteeman brianteeman - close - 1 Aug 2024
avatar brianteeman
brianteeman - comment - 1 Aug 2024

thanks

Add a Comment

Login with GitHub to post a comment