0

I am trying to send a newsletter to my clients.

  • So I go to Marketing --> Newsletter template and then add template do queue.

After this I set: Queue Date Start for example "send messages at 31.01.2018 19:23" and then click Save Newsletter.

After save I get error code:

1 exception(s):
Exception #0 (Exception): DateTime::__construct(): Failed to parse time string (31 sty 2018 18:37:37) at position 0 (3): Unexpected character

Exception #0 (Exception): DateTime::__construct(): Failed to parse time string (31 sty 2018 18:37:37) at position 0 (3): Unexpected character
#0 /home/b2b/domains/istyled.pl/public_html/vendor/magento/module-newsletter/Model/Queue.php(185): DateTime->__construct('31 sty 2018 18:...')
#1 /home/b2b/domains/istyled.pl/public_html/vendor/magento/module-newsletter/Controller/Adminhtml/Queue/Save.php(55): Magento\Newsletter\Model\Queue->setQueueStartAtByString('31 sty 2018 18:...')
#2 /home/b2b/domains/istyled.pl/public_html/var/generation/Magento/Newsletter/Controller/Adminhtml/Queue/Save/Interceptor.php(24): Magento\Newsletter\Controller\Adminhtml\Queue\Save->execute()
#3 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor->execute()
#4 /home/b2b/domains/istyled.pl/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#5 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#6 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor->___callParent('dispatch', Array)
#7 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Newslet...', 'dispatch', Object(Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor), Array, 'adminAuthentica...')
#8 /home/b2b/domains/istyled.pl/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#9 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#10 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Newslet...', 'dispatch', Object(Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor), Array, 'adminMassaction...')
#11 /home/b2b/domains/istyled.pl/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#12 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#13 /home/b2b/domains/istyled.pl/public_html/var/generation/Magento/Newsletter/Controller/Adminhtml/Queue/Save/Interceptor.php(39): Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor->___callPlugins('dispatch', Array, Array)
#14 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Newsletter\Controller\Adminhtml\Queue\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#15 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#17 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#18 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#19 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 /home/b2b/domains/istyled.pl/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /home/b2b/domains/istyled.pl/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#23 /home/b2b/domains/istyled.pl/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#24 {main}

Please note: *When I do not set Queue Date Start (only the empty field will remain) and then save I does not get this error but e-mail marketing it is not sent.

  • Non-stop newsletter have status "Sending" "processed: 0"
1

I think this might be because the timestamp you're passing "31 sty 2018 18:37:37" (what does sty mean?) isn't the correct date format for php, it should be

2018-01-31 18:37:37

I think. It may just be me being ignorant but what does 'sty' denote? Hope this helps

| improve this answer | |
  • 1
    Yes, it was your good idea! I have language packet installed for magento back-end. this date has also been translated by what magento gives an error. (this is mistake of people who were responsible for the translation). So now I have changed language version in back-end to traditional magento English and now all works ! Thanks. – Sylvester Jan 31 '18 at 15:59
  • Hey! Glad I could help, it'd be dope if you could accept my answer but awesome! – John Jan 31 '18 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.