Payment email exception for payed orders

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Payment email exception for payed orders

Post by Moritz » 10 Nov 2022, 06:54

When I make an order (payment received) and execute the order/email/payment job I get the following exception.
Error while trying to send payment e-mail for order ID "1215" and status "6": ID parameter needs to be passed for the cHash calculation!
#0 /var/www/typo3_src-11.5.17/typo3/sysext/core/Classes/Routing/PageRouter.php(498): TYPO3\CMS\Frontend\Page\CacheHashCalculator->getRelevantParameters()
#1 /var/www/typo3_src-11.5.17/typo3/sysext/core/Classes/Routing/PageRouter.php(484): TYPO3\CMS\Core\Routing\PageRouter->getCacheHashParameters()
#2 /var/www/typo3_src-11.5.17/typo3/sysext/core/Classes/Routing/PageRouter.php(372): TYPO3\CMS\Core\Routing\PageRouter->generateCacheHash()
#3 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-typo3/src/Base/View/Helper/Url/T3Router.php(69): TYPO3\CMS\Core\Routing\PageRouter->generateUri()
#4 [internal function]: Aimeos\Base\View\Helper\Url\T3Router->transform()
#5 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-base/src/View/Standard.php(87): call_user_func_array()
#6 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-base/src/View/Helper/Link/Standard.php(47): Aimeos\Base\View\Standard->__call()
#7 [internal function]: Aimeos\Base\View\Helper\Link\Standard->transform()
#8 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-base/src/View/Standard.php(87): call_user_func_array()
#9 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-controller-jobs/templates/order/email/payment/html.php(132): Aimeos\Base\View\Standard->__call()
#10 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-base/src/View/Standard.php(281): include('/var/www/typo3_...')
#11 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-base/src/View/Standard.php(263): Aimeos\Base\View\Standard->includeFile()
#12 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-controller-jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(466): Aimeos\Base\View\Standard->render()
#13 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-controller-jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(330): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->send()
#14 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-controller-jobs/src/Controller/Jobs/Order/Email/Payment/Standard.php(238): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->notify()
#15 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Classes/Scheduler/Base.php(60): Aimeos\Controller\Jobs\Order\Email\Payment\Standard->run()
#16 [internal function]: Aimeos\Aimeos\Scheduler\Base::Aimeos\Aimeos\Scheduler\closure()
#17 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-base/src/Process/None.php(44): call_user_func_array()
#18 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Classes/Scheduler/Base.php(63): Aimeos\Base\Process\None->start()
#19 /var/www/typo3_www.ami-informiert.de/typo3conf/ext/aimeos/Classes/Scheduler/Task/Typo6.php(41): Aimeos\Aimeos\Scheduler\Base::execute()
It occurs on this line.

exception.png
exception.png (67.04 KiB) Viewed 11012 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Payment email exception for payed orders

Post by aimeos » 11 Nov 2022, 05:55

Either you've used the standard Aimeos scheduler task instead of the Aimeos advanced scheduler task where you have to enter the IDs of the required pages or you've added a route enhancer rule which requires an ID which isn't passed as parameter to the URI builder.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 11 Nov 2022, 06:57

I use the Standard Aimeos scheduler task.
When I change the payment status of an order back to "waiting" and execute the job again I receive an email.
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 09:29

With the Aimeos advanced scheduler task I get the same error.
I have not added a additional route enhancer.

route_enhancers.png
route_enhancers.png (18.23 KiB) Viewed 10933 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 09:32

Strange is, that I get a mail when the status is on "pending".
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Payment email exception for payed orders

Post by aimeos » 25 Nov 2022, 09:44

Maybe this problem is related to an issue another user pointed us to and which we've fixed recently:
https://github.com/aimeos/aimeos-typo3/ ... 1f902ae92e
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 09:49

I'am the other user 😉
So the page ID is saved correctly in the task for me.
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Payment email exception for payed orders

Post by aimeos » 25 Nov 2022, 10:13

The TYPO3 error "ID parameter needs to be passed for the cHash calculation!" states that the page ID is missing when generating the URL for the account download page:

Code: Select all

$this->link( 'client/html/account/download/url', ['dl_id' => $attribute->getId()], ['absoluteUri' => 1] )
Code can be found here:
https://github.com/aimeos/ai-controller ... l.php#L132

This means, the page ID for the account download page isn't set. Maybe that helps debugging.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 10:22

That make sense.
I debugged the error and found out, that it occurs when creating the download URL with an id = 0.
Next I try to find out why it's zero.

empty_pageID.png
empty_pageID.png (94.44 KiB) Viewed 10928 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 11:10

Maybe you can evaluate it better.
I found out, that the result ($target) for the config "client/html/account/download/url" is null.

transform.png
transform.png (61.83 KiB) Viewed 10922 times

Because for the config the default value (null) is returned.

default_value.png
default_value.png (92.71 KiB) Viewed 10922 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

Post Reply