Closed (fixed)
Project:
Mailchimp
Version:
7.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2013 at 17:26 UTC
Updated:
27 Aug 2013 at 02:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
chrisjlee commentedFound it in README.txt:
Comment #2
gcbComment #3
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 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 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 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 commentedComment #8
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 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 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 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 commentedI can do both of those things sometime this week; stand by for patchery.
Comment #13
levelos commentedThanks for the input everyone. Committed a variation of #9 in c37803a.
Comment #15
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 commentedComment #17
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