Closed (fixed)
Project:
Mandrill
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 May 2020 at 17:02 UTC
Updated:
7 Jul 2021 at 22:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
karishmaamin commentedRemoved deprecated function and added core_version_requirement, please review
Comment #3
mrpauldriver commentedThank you for working on this @karishmaamin
After patching, this now passes with Upgrade Status module, but three warnings remain.
Comment #4
mrpauldriver commentedAfter patching the module and manually copying the Mandrill api library, I went on to test this on a Drupal 9 site and I discovered some problems.
- The path admin/config was a WSOD
- DB Log reported the error below;
This appears to be related to the first rector warning.
(I think I read that somewhere that certain Doctrine dependancies were deprecated).
Comment #5
rfmarcelino commentedSame here as in 4

'Doctrine\Common\ClassLoader' is deprecated.
Comment #6
beerendlauwers commentedLooking into what
classExistsactually does:And what typeExists does:
Hence, we can just replace the line with
if (class_exists('Mandrill')) {Comment #7
mrpauldriver commentedComment #8
valicAttaching patch with addition from #6.
Can't get proper interdiff, there are few more minor changes seem then in #2, even I started with that patch
Comment #9
mrpauldriver commentedI tested patch #8 against the latest dev (released 19 Oct 2020).
The good news is that the module now appears to be Drupal 9 compatible when tested with Update Status module, leaving only some test coverage items. I have not yet tested this on a live Drupal 9 installation.
The results from Upgrade Status module are copied below.
Comment #10
mrpauldriver commentedFixing tests is probably a good exercise for a novice. Tagging accordingly.
Comment #11
Pooja Ganjage commentedHi,
Creating a patch for this issue.
Please review the patch.
Thanks.
Comment #12
Pooja Ganjage commentedComment #13
mrpauldriver commentedThank you for looking at this Pooja. As with the automated test I am also finding that the patch will not apply.
Comment #14
Pooja Ganjage commentedUpdated patch.
Comment #16
Pooja Ganjage commentedComment #17
mrpauldriver commentedOnce again, thank you for working on this Pooja.
Revised patch applies without problems and resolves two of the warnings, but others remain, some of which appear to be related to submodules.
Comment #18
Pooja Ganjage commentedComment #20
Pooja Ganjage commentedComment #21
mrpauldriver commentedThis is now passing all tests with Upgrade Status module. Thank you.
When testing on a live Drupal 9 site the module is unable to find the Mandril php library so I can not test further. This now needs the attention of a maintainer.
I am using the recently updated Libraries module and everything is the same as a normal Drupal 8 installation.
It would be good to omit the dependancy on the Libraries modules, as many other modules have done
Comment #22
newaytech commentedHi folks - is anybody using this yet with success on a live Drupal 9 site? I'm getting ready to move from D8 to D9 - and this module is the last on my upgrade critical path...
Comment #23
jsidigital commented@newaytech
Did you manage to get this working in D9?
Has anyone gotten this to work on Drupal 9?
I have tried and cannot get it to work.
Test mail does not work. I set mailsystem to "Mandrill mailer" and when I send test I get this:
If I set mailsystem to "Mandril test mailer", it says it sent with no error, but I never actually get an email.
And if I try to add a template using the Mandrill Template module, I get this error:
Any ideas how to get this working on D9?
Thank you.
Comment #24
mrpauldriver commentedMy understanding is that Mandrill have updated their API and the current library is not compatible with Drupal 9.
The maintainers know about this and (via Twitter) have said they are planning to work on it. It is disappointing there has been no comment in this issue though.
Comment #25
john_b commentedTest messages continue to work for me. I do not think the patch can be the reason for test messages failing. Re #23 I wonder whether the Mandrill library is even installed, as per 'requirements' in README.txt?
Comment #26
mrpauldriver commentedComment #27
jsidigital commentedIf testing is working, it may be a library install issue.
I have a composer based D9 site. However I have never used composer to install a library. No idea how to do that and the readme file does not explain nor gives no command for me to use, doesnt give any guide as to what or how to edit composer.json.
So I simply downloaded the library and manually put it in the libraries folder. I take it that is the wrong approach.
Any help or guide as to how to add the library with composer would be much appreciated.
Thank you.
Comment #28
Pooja Ganjage commentedHi jsidigital,
Below mentioned code tells about that how to add library in composer file.
"repositories": [
{
"type": "package",
"package": {
"name": "mobiledetect/mobiledetectlib",
"version": "^2.8",
"type": "drupal-library",
"dist": {
"url": "https://github.com/serbanghita/Mobile-Detect/archive/2.8.34.zip",
"type": "zip"
}
}
}
],
"require": {
"mobiledetect/mobiledetectlib": "^2.8"
}
Please refer below link for more detail,
https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins...
Thanks.
Comment #29
jsidigital commented@Pooja Ganjage,
Thank you for taking the time to reply to my request.
As it turns out that is what I had on my composer.json file.
Problem ended up being with Mandrill. My current dev domain was not verified yet with Mandrill.
After I verified it, all mails went through.
Thank you.
Comment #30
mariacha1 commentedUpdating to add the blocker issue https://www.drupal.org/project/mandrill/issues/3207748
Comment #31
arthur.baghdasar commentedAny plan for the release?
Comment #32
mrpauldriver commented@arthur.baghdasar It appears that the maintainers have lost interest, so don't hold your breath.
In the meantime the related issue #3207748: Use Mailchimp Transactional API instead of Mandrill needs some attention.
Comment #33
mariacha1 commentedYou know, I think this isn't actually blocked by #3207748 after all. I was seeing that the errors in https://www.drupal.org/project/mandrill/issues/3137614#comment-14089086 matched the ones in https://www.drupal.org/project/mandrill/issues/3207748 and making assumptions that the issue was with the mandrill/mandrill library. But they seem to just be what happens if you haven't whitelisted your dev domain.
Although it's deprecated, the mandrill/mandrill library appears to still work. I was able to get this patch working with d9 without using Mailchimp Transactional. Setting back to RTBC.
Comment #35
mariacha1 commentedPatch applied to the 8.x-1.x branch. I'll see about cutting a release as well.