mailchimp / mc-magento2

MailChimp for Magento 2. Syncs all data (subscriber, customers, orders, products) and enables marketing automation with email campaigns, automations, ads, postcards and more.
Open Software License 3.0
157 stars 111 forks source link

2.2 Error Importing Configuration #223

Closed paulpartington-cti closed 6 years ago

paulpartington-cti commented 6 years ago

Issue Description

Preconditions

  1. Magento 2.2.2 installed
  2. mc-magento2-1.0.27

Steps to reproduce

  1. Install the module
  2. Run bin/magento app:config:dump
  3. This should output some configuration similar to the below in config.php:
    'mailchimp' =>
      array (
        'general' =>
        array (
          'active' => '0',
          'apikeylist' => NULL,
          'map_fields' => 'a:0:{}',
          'interest' => NULL,
          'interest_success_html_before' => NULL,
          'interest_success_html_after' => NULL,
        ),
        'ecommerce' =>
        array (
          'active' => '0',
          'customer_optin' => '0',
        ),
        'abandonedcart' =>
        array (
          'active' => '0',
        ),
      ),
  4. Run bin/magento app:config:import

Actual and Expected result

Expected Result

The configuration should be applied

Action Result

An error occurs when saving the configuration

Import failed: Notice: Undefined variable: active in /vendor/mailchimp/mc-magento2/Model/Config/Backend/ApiKey.php on line 81

chrisgan commented 6 years ago

@gonzaloebiz This error is actually still happening

Import failed: Notice: Undefined variable: active in /vendor/mailchimp/mc-magento2/Model/Config/Backend/ApiKey.php on line 81

As the error is in ApiKey.php file, which does not appear to have been updated in the commit referenced for the fix.

gonzaloebiz commented 6 years ago

this issue will be fixed in the next release (1.0.29), please see the milestone associated. You can try applying the associated PR

Best

chrisgan commented 6 years ago

@gonzaloebiz Yes I've tried the code from the PR and the issue is still happening. The ApiKey.php file needs updating with the same fix as MonkeyStore.php