BitBagCommerce / SyliusMailChimpPlugin

Simple MailChimp integration with Sylius eCommerce framework.
MIT License
42 stars 27 forks source link

You have requested a non-existent parameter "mailchimp.api_key" #27

Closed krystal25 closed 4 years ago

krystal25 commented 4 years ago

After installing the plugin, and setting the API keys in .env, I get the following error:

You have requested a non-existent parameter "mailchimp.api_key"

I can see the parameters declared in vendor\bitbag\mailchimp-plugin\tests\Application\config\packages_sylius.yaml_sylius.yaml

    mailchimp.api_key: '%env(resolve:MAIL_CHIMP_API_KEY)%'
    mailchimp.list_id: '%env(resolve:MAIL_CHIMP_LIST_ID)%'

and they are called in services.yml and contexts.yml

    bitbag_sylius_mailchimp_plugin.context.ui.shop.mailchimp:
        class: Tests\BitBag\SyliusMailChimpPlugin\Behat\Context\Ui\Shop\MailChimpContext
        arguments:
            - "@sylius.behat.shared_storage"
            - "%mailchimp.api_key%"
            - "%mailchimp.list_id%"

So why does it say it does not exist? If I replace %mailchimp.api_key% with the actual key, it works, but I do not want that as I need the key to be taken from .env

patrick477 commented 4 years ago

You must add a parameter to your _sylius.yaml file in your project

luckylucciano commented 4 years ago

Hello all,

Cannot install mailchimp-plugin, and same error, i ' ve not understood the solution before:

"You must add a parameter to your _sylius.yaml file in your project"

Need help...

TELLO0815 commented 3 years ago

@luckylucciano Late, but mb for other people. You must add before installation in _sylius.yaml under parameters:

parameters: sylius_core.public_dir: '%kernel.project_dir%/public' mailchimp.api_key: '%env(resolve:MAIL_CHIMP_API_KEY)%' mailchimp.list_id: '%env(resolve:MAIL_CHIMP_LIST_ID)%'