Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Compilation Fails with Braintree Payments
 
Commanderbob
Member
 
Total Posts:  61
Joined:  2008-10-19
 

I’m trying to use Braintree payments on my site and I got their extension working but it only works when compilation is disabled. Once I enable it I get a 500 error at the checkout page.

I enabled logs and system.log shows

2013-06-13T16:55:45+00:00 ERR (3): Warning: require_once(Braintree/lib/Braintree.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/includes/src/Braintree_Model_Paymentmethod.php on line 3

In that file line 3 is

require_once('Braintree/lib/Braintree.php');

which makes me think that compilation doesn’t do well with require_once calls. I looked in other files and it seems their require_once calls look like

#require_once 'Braintree/lib/Braintree.php';

so I tried to change it to that but it seems every time I enable compilation it changes it back to the original (any ideas why?)

I also tried removing that line but that just gave me

2013-06-13T17:15:49+00:00 ERR (3): Warning: include(/home/USERNAME/public_html/includes/src/Braintree_Configuration.php): failed to open stream: No such file or directory in /home/USERNAME/public_html/includes/src/Varien_Autoload.php on line 93
2013-06-13T17:15:49+00:00 ERR (3): Warning: include(): Failed opening ‘/home/USERNAME/public_html/includes/src/Braintree_Configuration.php’ for inclusion (include_path=’/home/USERNAME/public_html/includes/src:.:/usr/share/php:/usr/share/pear’) in /home/USERNAME/public_html/includes/src/Varien_Autoload.php on line 93

What’s the correct way to include that file so that it will work when compilation is enabled?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Commanderbob
Member
 
Total Posts:  61
Joined:  2008-10-19
 

Any ideas? I would really like to enable compilation again for speed reasons.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lecvar
Jr. Member
 
Total Posts:  7
Joined:  2011-11-04
 

Wayyyback I know but I’ve had this issue with other extensions.

The solution is to manually copy the missing code into includes/src. You can start with sited error file and if that doesn’t work copy the source folder into includes src.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top