JMAConsulting / biz.jmaconsulting.mte

Mandrill Emails Extension for CiviCRM
10 stars 21 forks source link

Webhook URL to Joomla failing #89

Closed tabletguy closed 8 years ago

tabletguy commented 9 years ago

Although I've created a webhook following the directions, when I click on the "send test" button on the MandrillApp website (https://mandrillapp.com/settings/webhooks), it always returns an error. The error has a DIFFERENT url than what is in the webhook.

mandrillapp_webhook_added

For that reason, I'm starting here to report, since it looks like the Mandrill Email extension might be changing the URL? I apologize if this isn't the correct place to report the issue.

Note that the website starts in a subdirectory "http://ahymsin.org/main/" in case that might be significant. Joomla 3.4.1 CiviCRM 4.6.3 Mandrill Mail Ext v 2.0

Error message returned (secret zeroed out)

Webhook failed with error: POST to http://ahymsin.org/main/component/civicrm/?lang=en&mandrillSecret=0000000000000000&task=civicrm/ajax/mte/callback failed with 500: 0 -

Sorry but we are not able to provide this at the moment.

Return to home page.

Full screen shot of error returned

webhook_failed

tabletguy commented 9 years ago

Note how the failing URL has "component" instead of "components" (which is the actual folder name in Joomla 3)

Additionally, if the URL is supposed to be calling components (with an 's'), then shouldn't it also be "components\com_civicrm" instead of "...\civicrm" ?

tabletguy commented 9 years ago

I also have another CiviCRM extension installed that sends internal error messages by email. It sent this, in case it adds more information. Obviously I've zero'ed the secret code. Again, this would have matched up with the "send test" button from MandrilApp.com


There was a CiviCRM error at AHYMSIN. Date: 2015-06-12T17:25:17-05:00

_ERROR_ Array ( [type] => 8 [message] => Undefined index: Mandrill Spam [file] => /home/ahymsinc/public_html/main/media/civicrm/custom_ext/biz.jmaconsulting.mte-2_0/CRM/Mte/BAO/Mandrill.php [line] => 186 ) Array ( [message] => [code] => )

_LOGGED IN USER_ count: 25 is_error: 1 error_message: Expected one Contact but found 25

_SERVER_ PATH: /sbin:/usr/sbin:/bin:/usr/bin PWD: /usr/local/cpanel/cgi-sys SHLVL: 0 HTTP_CONNECTION: close SCRIPT_NAME: /main/index.php REQUEST_URI: /main/component/civicrm/?lang=en&mandrillSecret=0000000000000000&task=civicrm/ajax/mte/callback QUERY_STRING: lang=en&mandrillSecret=0000000000000000&task=civicrm/ajax/mte/callback REQUEST_METHOD: POST SERVER_PROTOCOL: HTTP/1.1 GATEWAY_INTERFACE: CGI/1.1 REDIRECT_URL: /main/component/civicrm/ REDIRECT_QUERY_STRING:lang=en&mandrillSecret=0000000000000000&task=civicrm/ajax/mte/callback REMOTE_PORT: 10854 SCRIPT_FILENAME: /home/ahymsinc/public_html/main/index.php SERVER_ADMIN: webmaster@ahymsin.org CONTEXT_DOCUMENT_ROOT:/home/ahymsinc/public_html CONTEXT_PREFIX: REQUEST_SCHEME: http DOCUMENT_ROOT: /home/ahymsinc/public_html REMOTE_ADDR: 54.185.162.164 SERVER_PORT: 80 SERVER_ADDR: 184.154.90.58 SERVER_NAME: ahymsin.org SERVER_SOFTWARE: Apache SERVER_SIGNATURE: LD_LIBRARY_PATH: /usr/local/apache/lib CONTENT_TYPE: application/x-www-form-urlencoded CONTENT_LENGTH: 10530 HTTP_X_MANDRILL_SIGNATURE:ipawIimqtzM0Ls7j9vvbfjIp5Ns= HTTPACCEPT: /_ HTTP_HOST: ahymsin.org HTTP_USER_AGENT: Mandrill-Webhook/1.0 HTTP_AUTHORIZATION: UNIQUE_ID: VXtcS7iaWjoABoLD3hIAAAAj REDIRECT_STATUS: 200 REDIRECT_HTTP_AUTHORIZATION: REDIRECT_UNIQUE_ID: VXtcS7iaWjoABoLD3hIAAAAj FCGI_ROLE: RESPONDER PHP_SELF: /main/index.php REQUEST_TIME_FLOAT: 1434147915.0368 REQUEST_TIME: 1434147915

_BACKTRACE_

0 /home/ahymsinc/public_html/main/media/civicrm/custom_ext/ca.bidon.reporterror/reporterror.php(207): reporterror_civicrm_generatereport("AHYMSIN", (Array:2), NULL)

1 /home/ahymsinc/public_html/main/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(350): reporterror_civicrm_handler((Array:2))

2 /home/ahymsinc/public_html/main/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(1005): CRM_Core_Error::fatal()

3 /home/ahymsinc/public_html/main/media/civicrm/custom_ext/biz.jmaconsulting.mte-2_0/CRM/Mte/BAO/Mandrill.php(186): CRM_Core_DAO::getFieldValue("CRM_Mailing_DAO_BounceType", NULL, "description")

4 /home/ahymsinc/public_html/main/media/civicrm/custom_ext/biz.jmaconsulting.mte-2_0/CRM/Mte/Page/callback.php(50): CRM_Mte_BAO_Mandrill::processMandrillCalls((Array:13))

5 /home/ahymsinc/public_html/main/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Mte_Page_callback->run((Array:4), NULL)

6 /home/ahymsinc/public_html/main/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))

7 /home/ahymsinc/public_html/main/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))

8 /home/ahymsinc/public_html/main/components/com_civicrm/civicrm.php(86): CRM_Core_Invoke::invoke((Array:4))

9 /home/ahymsinc/public_html/main/components/com_civicrm/civicrm.php(11): civicrm_invoke()

10 /home/ahymsinc/public_html/main/libraries/cms/component/helper.php(391): require_once("/home/ahymsinc/public_html/main/components/com_civicrm/civicrm.php")

11 /home/ahymsinc/public_html/main/libraries/cms/component/helper.php(371): JComponentHelper::executeComponent("/home/ahymsinc/public_html/main/components/com_civicrm/civicrm.php")

12 /home/ahymsinc/public_html/main/libraries/cms/application/site.php(191): JComponentHelper::renderComponent("com_civicrm")

13 /home/ahymsinc/public_html/main/libraries/cms/application/site.php(230): JApplicationSite->dispatch()

14 /home/ahymsinc/public_html/main/libraries/cms/application/cms.php(252): JApplicationSite->doExecute()

15 /home/ahymsinc/public_html/main/index.php(40): JApplicationCms->execute()

16 {main}

_POST_ mandrill_events: [{"event":"deferral","msg":{"ts":1365109999,"subject":"This an example webhook message","email":"example.webhook@mandrillapp.com","sender":"example.sender@mandrillapp.com","tags":["webhook-example"],"opens":[],"clicks":[],"state":"deferred","metadata":{"user_id":111},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa","_version":"exampleaaaaaaaaaaaaaaa","smtp_events":[{"destination_ip":"127.0.0.1","diag":"451 4.3.5 Temporarily unavailable, try again later.","source_ip":"127.0.0.1","ts":1365111111,"type":"deferred","size":0}]},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa","ts":1434147917},{"event":"hard_bounce","msg":{"ts":1365109999,"subject":"This an example webhook message","email":"example.webhook@mandrillapp.com","sender":"example.sender@mandrillapp.com","tags":["webhook-example"],"state":"bounced","metadata":{"user_id":111},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa1","_version":"exampleaaaaaaaaaaaaaaa","bounce_description":"bad_mailbox","bgtools_code":10,"diag":"smtp;550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces."},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa1","ts":1434147917},{"event":"soft_bounce","msg":{"ts":1365109999,"subject":"This an example webhook message","email":"example.webhook@mandrillapp.com","sender":"example.sender@mandrillapp.com","tags":["webhook-example"],"state":"soft-bounced","metadata":{"user_id":111},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa2","_version":"exampleaaaaaaaaaaaaaaa","bounce_description":"mailbox_full","bgtools_code":22,"diag":"smtp;552 5.2.2 Over Quota"},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa2","ts":1434147917},{"event":"open","msg":{"ts":1365109999,"subject":"This an example webhook message","email":"example.webhook@mandrillapp.com","sender":"example.sender@mandrillapp.com","tags":["webhook-example"],"opens":[{"ts":1365111111}],"clicks":[{"ts":1365111111,"url":"http:\/\/mandrill.com"}],"state":"sent","metadata":{"user_id":111},"_id":"exam...

JoeMurray commented 8 years ago

Our extension is not designed to handle the Send Test from Mandrill. The latter does not include a valid bounce type.