3

Yesterday we installed a complete theme on our Magento website. We create a demo order by registering itself to test this procedure so we tried to print out the order invoice from my account option 'My Orders' but after click on it a long error is generated and I don't know how to fix it, please help me to fix this error, below we discussed this entire error.

Invalid method Mage_Page_Block_Html_Head::addEMItem(Array
(
    [0] => skin_css
    [1] => css/em_variation.css
    [2] => Mage_Core_Model_Layout_Element Object
        (
        )

    [3] => general_disable_frontend_variation
    [4] => 1
)
)

Trace:
#0 [internal function]: Varien_Object->__call('addEMItem', Array)
#1 [internal function]: Mage_Page_Block_Html_Head->addEMItem('skin_css', 'css/em_variatio...', Object(Mage_Core_Model_Layout_Element), 'general_disable...', '1')
#2 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(348): call_user_func_array(Array, Array)
#3 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(214): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Sales/Controller/Abstract.php(181): Mage_Core_Controller_Varien_Action->loadLayout('print')
#9 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Sales_Controller_Abstract->printAction()
#10 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('print')
#11 /home4/siraj786/public_html/dattaexpress/app/code/community/BalkeTechnologies/StoreMaintenance/Controller/Router/Standard.php(91): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Front.php(172): BalkeTechnologies_StoreMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home4/siraj786/public_html/dattaexpress/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /home4/siraj786/public_html/dattaexpress/index.php(87): Mage::run('', 'store')
#16 {main}
1

The addEMItem is called in the theme layout file.

It seems like your theme module rewrites the Html head block.

Ensure the addEMItem function is declared in the rewritten block and ensure you don't have any other extension rewriting the same block which would result in a conflict.

  • So what we need to do it to fix that problem?? – Siraj Mahmood Jan 14 '16 at 19:43
  • It depends. What did you find regarding my solution ? Is there an addEmItem function declared in the rewritten block ? Or is there any other block rewriting the Html head block ? – Raphael at Digital Pianism Jan 15 '16 at 8:37
  • I uninstall all extensions but error still there? which rewritten block you are talking about here? – Siraj Mahmood Jan 15 '16 at 19:52
  • Mage_Page_Block_Html_Head – Raphael at Digital Pianism Jan 16 '16 at 8:04
  • where we can see or find rewrite code in this theme? if we remove rewrite code then error problem will be resolved?? – Siraj Mahmood Jan 16 '16 at 18:54

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.