Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9229] Undefined array key "order" in Plugin/GraphQlPlaceOrderAddCartId.php on line 63 #2622

Open
Nuranto opened this issue May 23, 2024 · 2 comments · May be fixed by #2799
Open

[ECP-9229] Undefined array key "order" in Plugin/GraphQlPlaceOrderAddCartId.php on line 63 #2622

Nuranto opened this issue May 23, 2024 · 2 comments · May be fixed by #2799
Assignees
Labels
Bug report Indicates that issue has been marked as a possible bug

Comments

@Nuranto
Copy link
Contributor

Nuranto commented May 23, 2024

Describe the bug

Some of our clients (very small proportion) cannot place order (Internal Server Error)

We were not able to reproduce, so we don't know how. But we found this error in logs :

`main.ERROR: Warning: Undefined array key "order" in /var/www/html/vendor/adyen/module-payment/Plugin/GraphQlPlaceOrderAddCartId.php on line 63`

And indeed, that plugin does not take into consideration that original method can return an array without order :

        if ($this->errors) {
            return [
                'errors' =>
                    $this->errors
            ];
        }
        return [
            'order' => [
                'order_number' => $order->getIncrementId(),
                // @deprecated The order_id field is deprecated, use order_number instead
                'order_id' => $order->getIncrementId(),
            ],
            'orderV2' => $this->orderFormatter->format($order),
            'errors' => []
        ];

Magento version
2.4.7

Plugin version
9.4.1

@Nuranto Nuranto added the Bug report Indicates that issue has been marked as a possible bug label May 23, 2024
@RokPopov RokPopov changed the title Undefined array key "order" in Plugin/GraphQlPlaceOrderAddCartId.php on line 63 [ECP-9229] Undefined array key "order" in Plugin/GraphQlPlaceOrderAddCartId.php on line 63 May 28, 2024
@RokPopov
Copy link
Contributor

Hi @Nuranto,

Thank you for reporting this issue. I have created an internal ticket to address this issue, adding a check for the order.
One the fix PR is merged, this issue will automatically be closed.

Kind regards,
Rok

@RokPopov RokPopov self-assigned this May 28, 2024
@Man4x
Copy link

Man4x commented Jun 7, 2024

Hi
We meet this issue with all orders involving a zero total (i.e. "free" payment method), preventing any of these orders to be placed :(

@pmzandbergen pmzandbergen linked a pull request Nov 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants