Code Monkey home page Code Monkey logo

craft-mailchimp-transactional's People

Contributors

nstcactus avatar sanderpotjer avatar

Watchers

 avatar  avatar  avatar

Forkers

nstcactus

craft-mailchimp-transactional's Issues

failed to install mailchimp-transactional

Yii version 2.0.45.
Craft cms 3.8.2
Try to install version 1.0.3
User Composer update to add the module.
Install command: ./craft plugin/install mailchimp-transactional
Try to install the module and get the following error message:

  • failed to install mailchimp-transactional: syntax error, unexpected 'MailchimpTransactional' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

Using the install action in Craft cms and gives the same message.
With version 1.0.1 i get the same message.

I only found the requirement: Craftcms 3.7.0 of higer

Are there other requirements? (for example PHP version)
Do you know a possible solution for this?

Error: Typed property MailchimpTransactionalAdapter::$apiKey must not be accessed before initialization

On a brand-new "craftcms/cms": "^4.0.0.1" install, this is the error I get when browsing /admin/settings/email while "perfectwebteam/craft-mailchimp-transactional": "v2.0.0" is installed:

Error: Typed property perfectwebteam\mailchimptransactional\mail\MailchimpTransactionalAdapter::$apiKey must not be accessed before initialization in /vendor/craftcms/cms/src/helpers/Template.php:90
Stack trace:
#0 /storage/runtime/compiled_templates/66/661db757917b7e8e48018b72ccd0e1e2.php(44): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(perfectwebteam\mailchimptransactional\mail\MailchimpTransactionalAdapter), 'apiKey', Array)
#1 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_165cd49fa81e2e0b44a07033f9b7871f->doDisplay(Array, Array)
#2 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#3 /vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#4 /vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)
#5 /vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render(Array)
#6 /vendor/craftcms/cms/src/web/View.php(414): Twig\Environment->render('mailchimp-trans...', Array)
#7 /vendor/perfectwebteam/craft-mailchimp-transactional/src/mail/MailchimpTransactionalAdapter.php(94): craft\web\View->renderTemplate('mailchimp-trans...', Array)
#8 /vendor/twig/twig/src/Extension/CoreExtension.php(1607): perfectwebteam\mailchimptransactional\mail\MailchimpTransactionalAdapter->getSettingsHtml()
#9 /vendor/craftcms/cms/src/helpers/Template.php(101): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(perfectwebteam\mailchimptransactional\mail\MailchimpTransactionalAdapter), 'getSettingsHtml', Array, 'method', false, false)
#10 /storage/runtime/compiled_templates/5d/5d809cb411d9a6f9c453dbfd28ed7a7a.php(182): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(perfectwebteam\mailchimptransactional\mail\MailchimpTransactionalAdapter), 'getSettingsHtml', Array, 'method')
#11 /vendor/twig/twig/src/Template.php(171): __TwigTemplate_307ca017a608d88a92ea3f6400372f43->block_content(Array, Array)
#12 /storage/runtime/compiled_templates/e3/e333dded0c96c43ab342c8dc331986ac.php(583): Twig\Template->displayBlock('content', Array, Array)
#13 /vendor/twig/twig/src/Template.php(171): __TwigTemplate_a5ff15419c7926f99654dcb2ce78241a->block_main(Array, Array)
#14 /storage/runtime/compiled_templates/e3/e333dded0c96c43ab342c8dc331986ac.php(370): Twig\Template->displayBlock('main', Array, Array)
#15 /vendor/twig/twig/src/Template.php(171): __TwigTemplate_a5ff15419c7926f99654dcb2ce78241a->block_body(Array, Array)
#16 /storage/runtime/compiled_templates/1b/1b81d793d4d05a3384940932cf3074d8.php(94): Twig\Template->displayBlock('body', Array, Array)
#17 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_c40d59a1437d6d58fd3455efa5e7cf0b->doDisplay(Array, Array)
#18 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#19 /storage/runtime/compiled_templates/ba/bab60f9b0262f4962827d01c74cf40d5.php(56): Twig\Template->display(Array, Array)
#20 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_353be430d50faabe2e5208bf06f780c1->doDisplay(Array, Array)
#21 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#22 /storage/runtime/compiled_templates/e3/e333dded0c96c43ab342c8dc331986ac.php(172): Twig\Template->display(Array, Array)
#23 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_a5ff15419c7926f99654dcb2ce78241a->doDisplay(Array, Array)
#24 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#25 /storage/runtime/compiled_templates/5d/5d809cb411d9a6f9c453dbfd28ed7a7a.php(66): Twig\Template->display(Array, Array)
#26 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_307ca017a608d88a92ea3f6400372f43->doDisplay(Array, Array)
#27 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#28 /vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#29 /vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)
#30 /vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render(Array)
#31 /vendor/craftcms/cms/src/web/View.php(414): Twig\Environment->render('settings/email/...', Array)
#32 /vendor/craftcms/cms/src/web/View.php(467): craft\web\View->renderTemplate('settings/email/...', Array)
#33 /vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(52): craft\web\View->renderPageTemplate('settings/email/...', Array, 'cp')
#34 /vendor/yiisoft/yii2/web/Response.php(1095): craft\web\TemplateResponseFormatter->format(Object(craft\web\Response))
#35 /vendor/craftcms/cms/src/web/Response.php(286): yii\web\Response->prepare()
#36 /vendor/yiisoft/yii2/web/Response.php(339): craft\web\Response->prepare()
#37 /vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#38 /htdocs/index.php(12): yii\base\Application->run()
#39 {main}

Syntax error when using PHP7.4

When going to the mail settings page we get the following error:

syntax error, unexpected '|', expecting ';' or '{'
in /var/www/html/vendor/perfectwebteam/craft-mailchimp-transactional/src/mail/MailchimpTransactionalAdapter.php at line 101


    {
        return Craft::$app->getView()->renderTemplate('mailchimp-transactional/settings', [
            'adapter' => $this,
        ]);
    }
 
    /**
     * @inheritdoc
     */
-->    public function defineTransport(): array|Swift_Transport
    {
        return [
            'class' => MailchimpTransactionalTransport::class,
            'constructArgs' => [
                [
                    'class' => Swift_Events_SimpleEventDispatcher::class
                ]
            ],
            'apiKey' => Craft::parseEnv($this->apiKey),

Craft 3.7.33
PHP 7.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.