mollie / gambio

BSD 2-Clause "Simplified" License
4 stars 5 forks source link

Order status by language not found #16

Closed tuanthanh191996 closed 3 years ago

tuanthanh191996 commented 3 years ago

I'm using gambio v3.14.1.0 I have install mollie version for gambio 3.5-4.0 and get this error right after verify token success and press on the save button. Please check this log: FATAL ERROR(1): "Uncaught InvalidArgumentException: Order status name by language code "EN" not found. in GXMainComponents\Services\Core\OrderStatus\Entities\OrderStatus.inc.php:82 Stack trace:

0 GXModules\Mollie\Mollie\Admin\Classes\Controller\MollieModuleCenterModuleController.inc.php(205): OrderStatus->getName(Object(LanguageCode))

1 GXModules\Mollie\Mollie\Admin\Classes\Controller\MollieModuleCenterModuleController.inc.php(153): MollieModuleCenterModuleController->_formatOrderStatuses()

2 GXModules\Mollie\Mollie\Admin\Classes\Controller\MollieModuleCenterModuleController.inc.php(103): MollieModuleCenterModuleController->_getDataForConnectedProfile()

3 GXModules\Mollie\Mollie\Admin\Classes\Controller\MollieModuleCenterModuleController.inc.php(66): MollieModuleCenterModuleController->_getTemplateData()

4 GXEngine\Services\System\Http\Ht"

Funny things is if I install the mollie version for gambio 3.0-3.5 I do not get this error but I get another error when go back to the shopping page after setting up everything FATAL ERROR(1): "Uncaught Error: Class 'GuzzleHttp\Client' not found in \GXModules\Gambio\GoogleECommerce\Shop\Classes\Services\GoogleAnalyticsRefreshService.inc.php:72 Stack trace:

0 \GXModules\Gambio\GoogleECommerce\Shop\Overloads\ApplicationTopExtenderComponent\GoogleAnalyticsApplicationTop.inc.php(21): GoogleAnalyticsRefreshService::create(Object(GoogleAnalyticsRefreshServiceOptions))

1 \GXMainComponents\Application.inc.php(684): GoogleAnalyticsApplicationTop->proceed()

2 \GXMainComponents\Application.inc.php(109): Gambio\GX\Application->runExtenders()

3 \includes\application_top.php(15): Gambio\GX\Application->run()

4 \index.php(27): include('D:\ITBEE\src\sm...')

5 {main}

thrown" I have no idea why and how this error happen because the log do not related to mollie or anything but when i uninstall mollie the error is gone. Please check these error and fix it. Thanks

logeecom commented 3 years ago

Hi @tuanthanh191996,

Thanks for reaching us and reporting the issue.

Our team managed to reproduce and fix the issue.

The previous implementation was used the status name in English as a fallback value (when the status name doesn’t exist in the active Gambio language), so if some of the Gambio order statuses have been added without a name in English, it will cause the InvalidArgumentException.

This is modified, and the new implementation will use the value in the first available language as a fallback language.

Please download the latest version here: https://github.com/mollie/gambio/releases/tag/v1.0.4

If you have any questions, please let us know. Best regards.