magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Call to a member function getMethodInstance() on null in /srv/magento/vendor/paypal/module-braintree-core/Block/Form.php:174 #36131

Closed TerrapinSoftware closed 2 years ago

TerrapinSoftware commented 2 years ago

Preconditions and environment

Steps to reproduce

  1. Make sure that BrainTree credit card payments are enabled.
  2. View an order in the admin backend.
  3. Click Edit.

Expected result

The Edit form displays

Actual result

Partial HTML is displayed

Additional information

The file vendor/paypal/module-braintree-core/Block/Form.php contains a bug. The private variable $paymentDataHelper is not initialized. The fix is:


use Magento\Payment\Helper\Data as PaymentDataHelper;
...
    public function __construct(
        ...
        PaymentDataHelper $paymentDataHelper,
        array $data = []
    ) {
        parent::__construct($context, $paymentConfig, $data);
        ...
        $this->paymentDataHelper = $paymentDataHelper;
    }

### Release note

_No response_

### Triage and priority

- [X] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
m2-assistant[bot] commented 2 years ago

Hi @TerrapinSoftware. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

hostep commented 2 years ago

Magento has an official patch to solve this: https://support.magento.com/hc/en-us/articles/8322266352525

It's mentioned in the known issues section of the release notes of Magento 2.4.5.

m2-assistant[bot] commented 2 years ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 2 years ago

Hi @TerrapinSoftware , Thank you for reporting and collaboration. As mentioned by @hostep , this is a known issue and mentioned in release notes of 2.4.5 devdocs See the Admin can’t create order/reorder when Braintree payment enabled Knowledge Base article for a discussion of this issue and access to the patch. We are closing this issue. Please reopen / create new issue if you are still facing any issues. Thank you.