Skip to main content

Error in order Email notify

2 years 11 months ago #357358 by mojweb
-- HikaShop version -- : 5.0.2
-- Joomla version -- : 4.4.1
-- PHP version -- : 8.1

When try to send email to customer in order view (via email button) an error apears
An error has occurred.
0 4 arguments are required, 3 given


I have tryed this www.hikashop.com/forum/orders-management...tem-was-shipped.html but found no modified files.

Please Log in or Create an account to join the conversation.

2 years 11 months ago #357368 by nicolas
Replied by nicolas on topic Error in order Email notify
Hi,

It's hard to say where the problem is and what to do with the abbreviated error message.
Please activate the "debug" setting of the joomla configuration page and try again.
You'll get a more complete error message which will allow us to understand what's going on so that we can tell you what to do.

Please Log in or Create an account to join the conversation.

2 years 11 months ago #357409 by mojweb
Replied by mojweb on topic Error in order Email notify
This is what I get:
Call stack
# Function Location
1 () JROOT/libraries/src/Language/Text.php:281
2 sprintf() JROOT/libraries/src/Language/Text.php:281
3 Joomla\CMS\Language\Text::sprintf() JROOT/administrator/components/com_hikashop/classes/order.php:2023
4 hikashopOrderClass->loadMailNotif() JROOT/administrator/components/com_hikashop/classes/order.php:1991
5 hikashopOrderClass->loadMail() JROOT/administrator/components/com_hikashop/views/order/view.html.php:637
6 OrderViewOrder->mail() JROOT/administrator/components/com_hikashop/views/order/view.html.php:28
7 OrderViewOrder->display() JROOT/libraries/src/MVC/Controller/BaseController.php:660
8 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2576
9 hikashopController->display() JROOT/administrator/components/com_hikashop/controllers/order.php:367
10 OrderController->mail() JROOT/libraries/src/MVC/Controller/BaseController.php:693
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2554
12 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
13 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
15 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
17 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
18 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
20 require_once() JROOT/administrator/index.php:32

Please Log in or Create an account to join the conversation.

2 years 11 months ago #357411 by nicolas
Replied by nicolas on topic Error in order Email notify
Hi,

The error stack indicates that the error happens because of a wrong translation key.
The error message points at a translation key used on line 2023 of the file /administrator/components/com_hikashop/classes/order.php
That's where the subject of the email is translated by HikaShop.
So basically, you probably have a custom translation for the subject of the email being sent and this translation key doesn't have the correct number of variables in it (one too much)
So I would recommend checking your translation overrides under the Languages tab of the HikaShop configuration page.

Please Log in or Create an account to join the conversation.

2 years 11 months ago #357489 by mojweb
Replied by mojweb on topic Error in order Email notify
I have 2 overrides for subject. Deleted it and error is still there.
Where else to look?
Is it posible that original language file (slovenian) is the problem?

Please Log in or Create an account to join the conversation.

2 years 11 months ago #357498 by nicolas
Replied by nicolas on topic Error in order Email notify
Hi,

It indeed seems to be the case.
When I search for ORDER_NOTIFICATION_SUBJECT I can see this line for the Slovenian:
Code:
ORDER_NOTIFICATION_SUBJECT="Naročilo št. %s je %s - %s"
But if I check the same translation key for other languages, I see this:
Code:
ORDER_NOTIFICATION_SUBJECT="Your order No. %s at %s"
So there indeed is an extra parameter in Slovenian which shouldn't be there. Remove it and it should help.
We'll also change it on our end.
I think it was a bad copy/paste from one of the other order email subjects by the person who made that translation.

Please Log in or Create an account to join the conversation.

2 years 11 months ago #357577 by mojweb
Replied by mojweb on topic Error in order Email notify
Thank you. Solved.

Please Log in or Create an account to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum