• Resolved EricJohnsonGuru

    (@wormeyman)


    My Theme Kale-Pro declares the class MailChimp which conflicts with the new newsletter block I ended up just disabling the Mailchimp on my theme but not before i had a lot of Error 500’s.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Parris

    (@mindctrl)

    Hi @wormeyman

    Thanks for the report and sorry to hear you’re having problems.

    Can you talk more about the conflict you saw? Were you able to get any useful messages from the 500 error?

    We don’t load the Mailchimp class if it already exists here: https://github.com/studiopress/atomic-blocks/blob/95edfb729f9ec4387eb0b783721dc22571fdf526/atomicblocks.php#L55

    However, plugins load before themes, so I’m guessing your theme doesn’t do a similar check before loading its own version. Ideally a theme would not load Mailchimp-related code, since that’s not related to presentation.

    Thread Starter EricJohnsonGuru

    (@wormeyman)

    2019/04/04 17:11:34 [error] 47728#47728: *2503489 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot declare class DrewM\MailChimp\MailChimp, because the name is already in use in /www/eatingrichly_286/public/wp-content/themes/kale-pro/inc/mailchimp-api/src/MailChimp.php on line 13" while reading response header from upstream, client: 63.143.42.251, server: eatingrichly.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php7.3-fpm-eatingrichly.sock:", host: "eatingrichly.com", referrer: "https://eatingrichly.com/"

    I agree that the theme shouldn’t have done that :(.

    Thread Starter EricJohnsonGuru

    (@wormeyman)

    Plugin Author John Parris

    (@mindctrl)

    Thanks for the info. The theme appears to be loading that Mailchimp.php file without checking to see if the DrewM\MailChimp\MailChimp class already exists. If you could pass that along to the theme support folks, they should be able to update it easily.

    Since plugins load before the theme and we do a check before loading the Mailchimp class, there’s nothing more we can do in Atomic Blocks to prevent that. It will have to be updated in the theme.

    Glad to hear you were able to disable that feature. If they can add that additional check it will help prevent conflicts with Atomic Blocks and any other plugin that uses the same library.

    Let me know if you have any questions.

    Thread Starter EricJohnsonGuru

    (@wormeyman)

    Thank you i sent this thread to support. You can resolve this thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘AB 1.6.0 Add the Newsletter block. Broke my theme’ is closed to new replies.