0

I am getting the following error

Fatal error: Uncaught Error: Call to a member function getPdf() on bool in /var/www/html/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php:119 Stack trace: #0 /var/www/html/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php(489): Mage_Adminhtml_Controller_Sales_Invoice->printAction() #1 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(437): Mage_Adminhtml_Sales_Order_InvoiceController->printAction() #2 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(262): Mage_Core_Controller_Varien_Action->dispatch('print') #3 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(192): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #4 /var/www/html/app/code/core/Mage/Core/Model/App.php(381): Mage_Core_Controller_Varien_Front->dispatch() #5 /var/www/html/app/Mage.php(729): Mage_Core_Model_App->run(Array) #6 /var/www/html/index.php(80): Mage::run('default', 'store') #7 {main} thrown in /var/www/html/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php on line 119

0

Well that error indicates the class you are calling getPdf() on doesn't exist. If you check out app\code\core\Mage\Core\Model\Config.php (~ line 1352 (as of version 1.9.4.5)) specifically the getModelInstance() function, you can see that it only returns a boolean if the class doesn't exist or if there is a problem including the file (in the new $className area). If the problem is in the new $className area it might be helpful to remove the @ in the autoloader (lib\Varien\Autoload.php ~ line 94) so you can see some errors in your logs.

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.