0

So here's what I've done: Loads of customizing using /local copies of /core files. Updated from 1.9.0.1 to 1.9.1.

Now I can't send email. And no, I've ruled out the new >= 1.9 email-queue-through-cron-thingy as root to the error.

When sending invoice updates I get:

Fatal error: Call to a member function addEmailInfo() on a non-object in /xxx/app/code/core/Mage/Sales/Model/Order/Invoice.php on line 885

And this is the same for every email I try to send. New order gives:

Fatal error: Call to a member function addEmailInfo() on a non-object in /xxx/app/code/core/Mage/Sales/Model/Order.php on line 1326

...and so on.

This error occur both in front- and backend. So this has to be central.

And no, it's not the addEmailInfo() that's faulty.

$mailer = Mage::getModel('core/email_template_mailer');

$mailer returns empty, so I think the key is here.

I reiterate that this bit is unaltered Magento core so no custimizations here.

Any clues to what's wrong? Or at least how do I trace this error to it's origin? Or maybe tips where to start looking.

  • What happens if you call Mage::getModel('catalog/product')->load(1) ? Do you get the same "call to a member function XXXX() on a non-object"? – Julien Lachal Apr 10 '15 at 12:50
  • If $mailer = Mage::getModel('core/email_template_mailer'); is returning blank / null then this is the issue. I'm guessing you've over-ridden a core file (in local pool) that has since been altered by 1.9.1? Could you list the items you're overriding? – Douglas Radburn Apr 10 '15 at 12:53
  • @Julien Lachal: I get what can be expected. Or at least not bool(false). It returns a healthy object. At Douglas Radburn: Well, I meant "bool(false)" rather than just empty. Yes, that's what I thought too and therefore deleted/renamed both /core and /local directories. Then copied /core back from fresh Magento install .zip-file. I do however suspect residues from uninstalled extensions, but I never did install any extensions that would tamper with the mailing functions. I think. Thanks for swift answers to you both. Most appreciated! =D – Johnny Olsson Apr 10 '15 at 13:08
  • I would suggest removing as many XML files from etc/modules as you can, testing, and putting them back one by one to see if one is causing the issue then :) – Douglas Radburn Apr 10 '15 at 13:24
  • @DouglasRadburn: Thanks! I think I've found clues to a possible culprit. – Johnny Olsson Apr 10 '15 at 13:30
0

Solved.

An extension, EA Design PDF Invoice PDF Generator (v1.0.18 - v1.0.20), screwed things up. Connect Manager showed three updates for the extension (within five days). The extension coder probably struggled with Magento 1.9 compatibility ;)

Well thanks Julien Lachal and Douglas Radburn for getting me to think in other directions and thus helping me solve this!

  • aye no problem Johnny, could you please accept your answer so as it is marked as solved? You may (or may not) want to tell people which extension it is about, and its current version number, for people struggling with the same problem to be able to solve it. – Julien Lachal Apr 10 '15 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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