Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Where do i download the MCAPI class? And when i download it where do i copy it to? my libraries directory?
Comment | File | Size | Author |
---|---|---|---|
#9 | mcapi_not_found-1950408-9.patch | 867 bytes | __cj |
Comments
Comment #1
chrisjlee CreditAttribution: chrisjlee commentedFound it in README.txt:
Comment #2
gcbComment #3
gaele CreditAttribution: gaele commentedNo matter what, a fatal error should never occur. When I install mailchimp and go to Campaigns without installing the MCAPI I get a white screen. I would expect a bit or error handling and a message telling me what's missing and what to do.
Comment #4
levelos CreditAttribution: levelos commented@gaele, respectfully, there are plenty of situations where a fatal error will occur that a module cannot, and should not, account for. E.g., not meeting the module requirements or following the installation directions, which do tell you what to do.
Comment #5
chrisjlee CreditAttribution: chrisjlee commentedThere could be a more direct link to the installation instructions. That would be more helpful. Just a suggestion. Unless, i'm missing something.
The documentation link on the project page links to a community docs but that page doesn't have any installation instructions.
Comment #6
gaele CreditAttribution: gaele commentedWell, it could, but we differ on whether it should. Such a fatal error makes me wonder how robust the module is and what else I can expect.
I'd suggest adding a heading "Dependencies" mentioning MCAPI to the project page, perhaps with a link to the README.
Comment #7
gaele CreditAttribution: gaele commentedComment #8
levelos CreditAttribution: levelos commented@gaele, thanks for the suggestion, the project page already makes the dependency clear. We'll continue to improve the project page and docs over time. There is not open issue, so please stop reopening it.
Comment #9
__cj CreditAttribution: __cj commentedThis caught me out too.
The attached patch stops the fatal error (by returning null), and puts in a watchdog error, and displays a message on the screen.
(Hi levelos - apologies for reopening, I hope my small contribution excuses this behaviour, and I promise not to reopen if you close it again).
Comment #10
bc CreditAttribution: bc commentedThe patch in #9 worked for me. I think that this patch improves this module's usabiltiy.
Another approach can be seen in fb_autopost: http://drupalcode.org/project/fb_autopost.git/blob/refs/heads/7.x-1.x:/f...
In addition we can test in the install requirements phase: http://drupalcode.org/project/views_slideshow.git/blob/refs/heads/7.x-3....
Comment #11
__cj CreditAttribution: __cj commentedThanks for the review.
Throwing an exception instead of calling drupal_set_message, and also implementing hook_requirements would both be worth doing - setting back to needs work.
Comment #12
bc CreditAttribution: bc commentedI can do both of those things sometime this week; stand by for patchery.
Comment #13
levelos CreditAttribution: levelos commentedThanks for the input everyone. Committed a variation of #9 in c37803a.
Comment #15
Vincenzo Gambino CreditAttribution: Vincenzo Gambino commentedHi Levelos,
I've spotted a possible bug in the commit from #13.
You mentioned a variation of the patch from #9, I think from the changes you made there is now a parameter is missing, it should be:
watchdog('mailchimp', $msg, array(), WATCHDOG_ERROR);
rather than
watchdog('mailchimp', $msg, WATCHDOG_ERROR);
If you forget to load the library this missed argument will break admin/reports/dblog page due to a type error.
thanks,
Vincenzo
Comment #16
Vincenzo Gambino CreditAttribution: Vincenzo Gambino commentedComment #17
chrisjlee CreditAttribution: chrisjlee commentedVicenzo thanks for spotting that. I went ahead and created a separate issue for that. #2063783: Watchdog message missing array parameter causing type error