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

Event Cart: fix sending of email receipts #14170

Merged
merged 1 commit into from
May 1, 2019

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented May 1, 2019

Overview

When using the Event Cart, the configuration emails would cause a fatal error.

To reproduce, one needs to enable the Event Cart (Administer > CiviEvent > Event component settings), setup an event, add to cart and checkout.

Technical Details

This looks like a terrible solution, but it's what CRM/Contact/Form/Task/EmailCommon.php does.

@civibot
Copy link

civibot bot commented May 1, 2019

(Standard links)

@civibot civibot bot added the master label May 1, 2019
@mattwire
Copy link
Contributor

mattwire commented May 1, 2019

This looks like a terrible solution, but it's what CRM/Contact/Form/Task/EmailCommon.php does.

@mlutfy Is there scope here for sharing the emailReceipt() function?

@mlutfy
Copy link
Member Author

mlutfy commented May 1, 2019

odd unrelated test fail:

api_v3_AttachmentTest::testCreate with data set #0 ('CRM_Activity_DAO_Activity', array('test_NssIC_exampleFromContent.txt', 'text/plain', 'My test description', 'My test content'), 'My test content')
Expect field url to match
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://core-14170-was5.test-1.civicrm.org:8001/index.php?q=civicrm/file&reset=1&id=1&eid=1&fcs=a1ab9ac53c39bb5bf3443329f3376b7924cbbf6b7681d65e71bd05c405115a6e_1556709866_168'
+'http://core-14170-was5.test-1.civicrm.org:8001/index.php?q=civicrm/file&reset=1&id=1&eid=1&fcs=a1ab9ac53c39bb5bf3443329f3376b7924cbbf6b7681d65e71bd05c405115a6e_1556709867_168'

/home/jenkins/bknix-dfl/build/core-14170-was5/sites/all/modules/civicrm/tests/phpunit/api/v3/AttachmentTest.php:335
/home/jenkins/bknix-dfl/build/core-14170-was5/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:201
/home/jenkins/bknix-dfl/civicrm-buildkit/extern/phpunit5/phpunit5.phar:598

@mlutfy
Copy link
Member Author

mlutfy commented May 1, 2019

This looks like a terrible solution, but it's what CRM/Contact/Form/Task/EmailCommon.php does.
@mlutfy Is there scope here for sharing the emailReceipt() function?

Was there any refactoring already done in that area? It seems like every entity has their own emailReceipt function, but they're all a bit different. (one could argue they are wrappers over sendMail)

@mlutfy
Copy link
Member Author

mlutfy commented May 1, 2019

jenkins, test this please

@eileenmcnaughton
Copy link
Contributor

Per comments elsewhere - we can't have the same review bar for event cart because the code ahs always been kinda-alpha-y - & we have no reviewers / experts in this code - merging this based on reading the code & it making sense

@eileenmcnaughton eileenmcnaughton merged commit 70a266a into civicrm:master May 1, 2019
@eileenmcnaughton eileenmcnaughton deleted the cart-emails branch May 1, 2019 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants