Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[com_privacy] Delete request if we cant send email #23096

Closed
wants to merge 3 commits into from
Closed

[com_privacy] Delete request if we cant send email #23096

wants to merge 3 commits into from

Conversation

PhilETaylor
Copy link
Contributor

Closes #23074

Summary of Changes

If mail is enabled in Joomla config, but we were unable to send the email, the request is created, but the error message states that the request was not created.

There is no point in creating a request if we cannot send the email - this is why mailing has to be enabled. If your mail settings are wrong, the mail cannot be sent, and therefore we should remove the request and inform the user correctly.

Testing Instructions

Default 3.9.0 installation with this PR.
Create a "Create Request" Menu item using Privacy -> Create Request menu type
in Joomla Global Config set:

  • Send Mail = Yes
  • Mailer = SMTP
  • SMTP HOST = NO_SUCH_SERVER
    Login to frontend of the site
    Click Create Request
    Enter email address
    Click submit

Expected result

screenshot 2018-11-16 at 11 37 54

and NO ROW left in #__privacy_requests

Actual result

(note this error was NOT generated with the above testing instructions, for this one you need to disable mail in php which is harder than the above testing instructions.)

48470377-2ccf9d00-e7e9-11e8-8c94-0837f45200cd

and ROW left in #__privacy_requests even though the error says no request was made.

Documentation Changes Required

None

@PhilETaylor

This comment was marked as abuse.

@mbabker
Copy link
Contributor

mbabker commented Nov 16, 2018

I don't support this. It was intended to have a "resend email" feature in the admin before I burned out on this work. A request should not be removed simply because the user notification email does not get sent out.

I'm also not comfortable having an "easy to use" PHP API that encourages deleting requests. The workflow is designed so that these should NOT be deleted.

Lastly, this does also make it possible for a request to be invalidated/deleted if for whatever reason the Table API fails to load the request record to be able to build the action log message.

@PhilETaylor

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants