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.
hello when navigationg to admin/config with mailchimp and it's 3 sub modules installed I get the following error:
Fatal error: Class 'Mailchimp' not found in modules/mailchimp/src/DrupalMailchimp.php on line 19
I'm using d8 rc3. Tried using latest dev however it's still showing.
Comments
Comment #2
Greg BoggsThis looks like a bug in our mailchimp library detection. Mailchimp not found means it can't find the mailchimp library.
Comment #3
promount CreditAttribution: promount commentedI had this error when first installed the module. Maybe sounds obvious but do you have the library installed? I followed the instructions in here https://www.drupal.org/node/2405811 and the error was gone.
Comment #4
kingfisher64 CreditAttribution: kingfisher64 commented@promount - I think it's exactly that. I didn't, but wasn't expecting it to throw a fatal, but just report library missing on reports screen.
Will have a look asap.
Comment #5
Greg BoggsThanks for the report, we'll be improving this shortly.
Comment #6
kingfisher64 CreditAttribution: kingfisher64 commentedSuper, will report back as soon as new dev is available.
Would you put the library status on the report page and clarify the path in 8 on the project homepage.
DrupalMailchimp.php is not used in d7 version and is the relevant files are output to libraries/mailchimp/...
The D8 library is referencing a library location within the module sub directory. Can this be changed to libraries/mailchimp/DrupalMailchimp.php?
Comment #7
Finabluma CreditAttribution: Finabluma commentedI've been struggling to be able to use this module. All the time same error. I follow all recomendations I could read without success...
Fatal error: Class 'Mailchimp' not found in /Users/.../Sites/devdesktop/oscar/modules/mailchimp/src/DrupalMailchimp.php on line 19
Comment #8
kingfisher64 CreditAttribution: kingfisher64 commented2015-Dec-03 dev version still is not working.
#6 re-iterated again :)
Comment #9
Rev314159 CreditAttribution: Rev314159 commentedI followed the advice from #3, but it still fails. I have gotten #3 to work for other libraries and they load just fine. Also, on the composer report page on
admin/reports/composer-manager
, it lists that the library is loaded fine. Only when I go to certain config pages, I get the WSOD. From what I can tell, it appears line 11 inDrupalMailchimp.php
(in the src folder) does not actually load the Class all of the time, if any. This is line 11:use Mailchimp;
So, in the meantime, I inserted my own (old school) include statement after line 11 and it seemed to fix the problem.
Comment #10
agialab CreditAttribution: agialab as a volunteer commentedA little less 'relative' would be:
require_once ($_SERVER['DOCUMENT_ROOT']. '/vendor/mailchimp/mailchimp/src/Mailchimp.php');
(which works)
Another option is to add the libraries dependency to the project and do it that way.
After some research I have yet to find a good solution to include /vendor libraries in projects...
Comment #11
bkeller CreditAttribution: bkeller commentedI used #10 - worked for me - thank you.
Comment #12
taherpro CreditAttribution: taherpro at Red Crackle commented#10 solves the issue, Thanks
Comment #13
RKopacz CreditAttribution: RKopacz commentedHas the fix in #10 been committed to the dev version, does anyone know? I'd like to be able to use this module but I am getting the same error.
Comment #14
ruscoe CreditAttribution: ruscoe at ThinkShout for Mailchimp commentedThe library has been bundled with the module since 8.x-1.0, as a lot of people were having issues with the Composer approach. I recommend upgrading to the latest - 8.x-1.1.