-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Send Test Mail] Use json MimeType, send data via POST method and catch json response errors #9685
Conversation
is #5238 related? This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
i think that's unrelated to this issue. |
ok - fair enough ;)
|
Being completely honest with you, the last time I tried working with BTW, this is just me being nit-picky for the sake of being nit-picky, but headers should be consistently set and sent through the application like https://github.com/joomla/joomla-cms/blob/staging/components/com_finder/controllers/suggestions.json.php does (the day components ever get real automated tests written for them using PHP's |
ok just changed jquery javascript to handle the json object data without the need to use parseJSON (it's already fetched as a json object). ready for testing. NOTE: i also changed the HTTP method to POST so the smtp server password doesn't appear in the server/proxies log files. |
@piotrmocko please try now i have added some ajax fail treatments in this PR. Don't forgot to clear the browser cache. |
no it also works on malformed json , just tested. to trown a warning i added trigger_error('aaa', E_USER_WARNING); in https://github.com/joomla/joomla-cms/pull/9685/files#diff-f0600c10281461980c2770b1951d453eR42 HTTP status 200. Page:
|
I will test it again |
ok, don't forget to clear the browser cache |
I have tested this item ✅ successfully on 6d22f55 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
Finally it helped :) It looks like it has changed in jQuery in last years. |
This PR has received new commits. CC: @richard67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
This PR has received new commits. CC: @richard67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
@richard67 @piotrmocko |
If you explain me what "mimified" means 😄 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
copy pasting ... errors... and lack of sleep |
Ah, I thought maybe it has to do with a girl named "Mimi" This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
This PR has received new commits. CC: @mikeveeckmans, @richard67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
This PR has received new commits. CC: @mikeveeckmans, @richard67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
This PR has received new commits. CC: @mikeveeckmans, @richard67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
ok. language variables added. |
@@ -229,6 +229,11 @@ COM_CONFIG_SAVE_SUCCESS="Configuration successfully saved." | |||
COM_CONFIG_SENDMAIL_ACTION_BUTTON="Send Test Mail" | |||
COM_CONFIG_SENDMAIL_BODY="This is a test mail sent using "_QQ_"%s"_QQ_". If you receive it, then your email settings are correct!" | |||
COM_CONFIG_SENDMAIL_ERROR="Test mail could not be sent." | |||
COM_CONFIG_SENDMAIL_JS_ERROR_CONNECTION_ABORT="A connection abort as occured while fetching the JSON data." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HAS not AS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all corrected
Removed the RTC label and made some comments on the language strings This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
This PR has received new commits. CC: @mikeveeckmans, @richard67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
The latest change was adding javascript language vars as @wilsonge requested. @mikeveeckmans, @richard67, @brianteeman can you retest to get this RTC again? |
This looks MUCH better - thankyou! |
I have tested this item ✅ successfully on f56e8c8 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
I have tested this item ✅ successfully on f56e8c8 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
I have updated #9768 with the code from this issue. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9685. |
Summary of Changes
Testing Instructions
Correct HTTP header mimetype and HTTP method
content-type:text/html; charset=UTF-8
and the HTTP method isGET
content-type:application/json; charset=utf-8
and the HTTP method isPOST
Catch HTTP or json failure errors