How to configure and adapt Aimeos based shops as developer
Forum rules: Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#5477 by sixbynine
20 Jan 2018, 22:06
Hello!
I just checked, each entry is the same in the madmin_log table :

Facility : message
Priority : 3
Message : Error while trying to send payment e-mail for order ID "xx" and status "6": No value for key "summaryBasket" found
#5482 by sixbynine
21 Jan 2018, 13:00
Here is the stack trace :

Error while trying to send payment e-mail for order ID "xx" and status "6":
#0 /ext/ai-client-html/client/html/templates/email/common/text-summary-body-standard.php(8): Aimeos\MW\View\Standard->__get('summaryBasket')

Thank you very much !
#5492 by sixbynine
21 Jan 2018, 22:10
Error while trying to send payment e-mail for order ID "xx" and status "6":
Code: Select all#0 /path/to/myproject/ext/ai-client-html/client/html/templates/email/common/text-summary-body-standard.php(8): Aimeos\MW\View\Standard->__get('summaryBasket')

#1 /path/to/myproject/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/View/Standard.php(251): include('/path/to...')

#2 /path/to/myproject/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/View/Standard.php(233): Aimeos\MW\View\Standard->includeFile('/path/to...')

#3 /path/to/myproject/ext/ai-client-html/client/html/src/Client/Html/Email/Payment/Text/Summary/Standard.php(101): Aimeos\MW\View\Standard->render('email/common/te...')

#4 /path/to/myproject/ext/ai-client-html/client/html/src/Client/Html/Email/Payment/Text/Standard.php(96): Aimeos\Client\Html\Email\Payment\Text\Summary\Standard->getBody('')

#5 /path/to/myproject/ext/ai-client-html/client/html/src/Client/Html/Email/Payment/Standard.php(101): Aimeos\Client\Html\Email\Payment\Text\Standard->getBody('')

#6 /path/to/myproject/ext/ai-client-html/controller/jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(251): Aimeos\Client\Html\Email\Payment\Standard->getBody()

#7 /path/to/myproject/ext/ai-client-html/controller/jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(215): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->processItem(Object(Aimeos\Client\Html\Email\Payment\Standard), Object(Aimeos\MShop\Order\Item\Standard), Object(Aimeos\MShop\Order\Item\Base\Standard), Object(Aimeos\MShop\Order\Item\Base\Address\Standard))

#8 /path/to/myproject/ext/ai-client-html/controller/jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(129): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->process(Object(Aimeos\Client\Html\Email\Payment\Standard), Array, 6)

#9 /path/to/myproject/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php(69): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->run()

#10 [internal function]: Aimeos\Shop\Command\JobsCommand->Aimeos\Shop\Command\{closure}(Object(Aimeos\MShop\Context\Item\Standard), Object(Aimeos\Bootstrap), 'order/email/pay...')

#11 /path/to/myproject/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Process/Decorator/Check.php(63): call_user_func_array(Object(Closure), Array)

#12 /path/to/myproject/vendor/aimeos/aimeos-laravel/src/Aimeos/Shop/Command/JobsCommand.php(72): Aimeos\MW\Process\Decorator\Check->start(Object(Closure), Array, true)

#13 [internal function]: Aimeos\Shop\Command\JobsCommand->handle()

#14 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)

#15 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

#16 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))

#17 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#18 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)

#19 /path/to/myproject/vendor/symfony/console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

#20 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

#21 /path/to/myproject/vendor/symfony/console/Application.php(938): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#22 /path/to/myproject/vendor/symfony/console/Application.php(240): Symfony\Component\Console\Application->doRunCommand(Object(Aimeos\Shop\Command\JobsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#23 /path/to/myproject/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#24 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#25 /path/to/myproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#26 /path/to/myproject/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

#27 {main}
#5499 by aimeos
22 Jan 2018, 16:01
That's extremely strange because we've tested that again in a new Aimeos/Laravel installation (2018.01 and Laravel 5.5) and it works without any problems. Can you please add a debug message like
Code: Select allerror_log( __METHOD__ );

here: https://github.com/aimeos/ai-client-html/blob/master/client/html/src/Client/Html/Email/Payment/Text/Summary/Standard.php#L213

Does it get printed if you execute
Code: Select all./artisan aimeos:jobs order/email/payment
#5515 by aimeos
23 Jan 2018, 22:54
Now things are getting really strange!

Can you replace "\Aimeos\MW\Process\Pcntl" by "\Aimeos\MW\Process\None" in the ./vendor/aimeos/aimeos-laravel/ directory and try again: https://github.com/aimeos/aimeos-laravel/blob/master/src/Aimeos/Shop/Base/Context.php#L210

This will disable parallel processing of the executed tasks
#5539 by aimeos
24 Jan 2018, 22:51
Can you add a "error_log(print_r($this,true));" to the view just before "$this->summaryBasket" is used and see if the view object contains some data at all?
#5545 by aimeos
25 Jan 2018, 13:24
OK, we've found the problem. The view has been cached and sending one e-mail works fine but if there are more it will get flaky. Can you please run "composer update" and try again?

Thank you very much vor your help and patience!