3

On a mage site using sagepay, inside the Sagepaysuite model there is a call to a class

file: Ebizmarts/SagePaySuite/Model/Api/Payment.php

   $xml = new Ebizmarts_Simplexml_Element('<customer />');

The class 'Ebizmarts_Simplexml_Element' can be found in - root/lib/Ebizmarts/Simplexml/Element.php

   class Ebizmarts_Simplexml_Element extends Varien_Simplexml_Element

I can see from checking apache logs that this cannot be found

   Class 'Ebizmarts_Simplexml_Element' not found in <path to payment.php

I assume an include of this file before the class is called would work but this cannot be best practice and may not be enough if the class is required in other areas of the extension that I have not yet noticed. How exactly are lib files loaded in Magento and any ideas why it is not getting it in this case.

1 Answer 1

3

Theoratical lib is part of the include_path and the autoloader searches for the file in the include_path. The question is, why does your installation not.

I would think you have turned on the compiler (DON'T DO THIS. REALLY!).

If this is not the case, maybe you have Aoe_ClassPathCache installed, or something similar?

Whatever you have installed, this should not happen and I'm sure, in a standard magento this doesn't happen.

1
  • 1
    I didn't see you're message until after I deleted the whole extension and reinstalled manually, re-indexed, flushed the cache and found that compilation was on (which I didn't expect). One of your suggestions worked so you deserve the approval :) Commented Mar 4, 2014 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.