Hi I am having difficulties getting Magento 2.4.1 to work when Braintree module is enabled. With Braintree enabled I cannot view the product page, i get an error that begins with

Error: Class 'Braintree\Configuration' not found

When I disable the braintree module I can access the product page ok.

When I run

php bin/magento setup:di:compile

I get the following error:

Compilation was started. Area configuration aggregation... 5/9 [===============>------------] 55% 37 secs 288.0 MiB In ClassReader.php line 45: Impossible to process constructor argument Parameter #1 [ Braintree\Transaction $transaction ] of PayPal\Braintree\Model\Report\Row\TransactionMap class In ClassReader.php line 34: Class Braintree\Transaction does not exist setup:di:compile

I have ran setup upgrade, clean and flush cache then tried to di:compile still issues occurs.

Short of a fresh install i cannot think of anything else that may resolve the issue.

Any help would be of great help.

有帮助吗?

解决方案

I contacted Gene for support and as suggest by Petar, the braintree module did not install properly.

Gene advised to me run

composer require braintree/braintree_php:5.2.0

Which resolved the issue.

其他提示

You should freely remove braintree and all other modules that are not essential. Check out https://github.com/yireo/magento2-replace-all to see all the modules that you can remove freely without any issues to your magento installation.

What we do is we create our own module that has just an .json file with the same contents as the one from Yireo, where we remove the modules that we dont want to have in our Magento instance.

许可以下: CC-BY-SA归因
scroll top