Error in magento admin print page - php

I developed on e commerce website in magento
When i click print button in magento invoice admin page the error is occur
Table offset (1445424) not within expected range
Trace:
#0 /var/www/ecommerce/lib/Zend/Pdf/Font.php(615): Zend_Pdf_Font::_extractTrueTypeFont(Object(Zend_Pdf_FileParserDataSource_File), 0)
#1 /var/www/ecommerce/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php(807): Zend_Pdf_Font::fontWithPath('/var/www/ecommerce/l...')
#2 /var/www/ecommerce/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php(113): Mage_Sales_Model_Order_Pdf_Abstract->_setFontBold(Object(Zend_Pdf_Style), 10)
#3 /var/www/ecommerce/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php(119): Mage_Sales_Model_Order_Pdf_Invoice->getPdf(Array)
#4 /var/www/ecommerce/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php(489): Mage_Adminhtml_Controller_Sales_Invoice->printAction()
#5 /var/www/ecommerce/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_Order_InvoiceController->printAction()
#6 /var/www/ecommerce/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('print')
#7 /var/www/ecommerce/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /var/www/ecommerce/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 /var/www/ecommerce/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /var/www/ecommerce/index.php(95): Mage::run('', 'store')
#11 {main}
how to fix this issue?
Please help me

It's Working for me !!
This bug appears to be happening for me on Magento installs on PHP 5.4 and above.
Change
abstract public function __construct();
to
abstract public function __construct($filePath);

Encountered the same problem, and for me the fix was to re-upload all the fonts inside lib/ which somehow got corrupted.

Related

Magento 1.9 - Cannot View Dataflow Advanced Profiles Page in Admin

I am trying to create new advanced profile in Magento 1.9, but I can't seem to get to the list page (System > Import/Export > Dataflow - Advanced Profiles).
Here is the stack trace for the list page:
ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Adminhtml_Block_System_Convert_Profile_Grid' in /home/test/public_html/mg1/app/Mage.php:595
Stack trace:
#0
/home/test/public_html/mg1/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1
/home/test/public_html/mg1/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('adminhtml/syste...', Array)
#2
/home/test/public_html/mg1/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(66): Mage_Core_Model_Layout->createBlock('adminhtml/syste...', 'system_convert_...')
#3
/home/test/public_html/mg1/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Widget_Grid_Container->_prepareLayout()
#4
/home/test/public_html/mg1/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#5
/home/test/public_html/mg1/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php(84): Mage_Core_Model_Layout->createBlock('adminhtml/syste...', 'convert_profile')
#6
/home/test/public_html/mg1/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_Convert_ProfileController->indexAction()
#7
/home/test/public_html/mg1/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#8
/home/test/public_html/mg1/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9
/home/test/public_html/mg1/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#10
/home/test/public_html/mg1/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11
/home/test/public_html/mg1/index.php(83): Mage::run('', 'store')
#12
{main}
Any ideas on what to do?
This is due to a new security feature Magento introduced with its version 1.9.
As the error message showd you need to whitelist the block adminhtml/system_convert_profile_grid.
To do that you can go to System > Permissions > Blocks and enter the block above.

Adding canonical tags in Magento (Pre 1.4)

I am trying to add canonical tags to specific pages in Magento. This has been well documented and fairly simple in recent additions of magento as they are supported. However, we run an old version of Magento in which it is not built in.
I have found many instructions most request that you add this to the page update layout.
<reference name="head">
<action method="addLinkRel">
<rel>canonical</rel>
<href>http://www.AddYourUrlHere.com/</href>
</action>
</reference>
However, this causes and error (i think due to the version of magento) and the page fails to load. I am sure that there is a method to add them and it has been hinted to look at the head.phtml file.
Could anybody shed any light on this and help me find a fix for Magento 1.3.2.
I know handfuls of coding in php but thats about it so it would be apreciated if any answers were explained as if im an idiot :)
Thank you!
Invalid method Mage_Page_Block_Html_Head::addLinkRel(Array
(
[0] => canonical
[1] => http://www.AddYourUrlHere.com/
)
)
Trace:
#0 [internal function]: Varien_Object->__call('addLinkRel', Array)
#1 [internal function]: Mage_Page_Block_Html_Head->addLinkRel('canonical', 'http://www.AddY...')
#2 /home/atpinst/public_html/app/code/core/Mage/Core/Model/Layout.php(338): call_user_func_array(Array, Array)
#3 /home/atpinst/public_html/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /home/atpinst/public_html/app/code/core/Mage/Core/Model/Layout.php(200): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /home/atpinst/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(303): Mage_Core_Model_Layout->generateBlocks()
#6 /home/atpinst/public_html/app/code/core/Mage/Cms/Helper/Page.php(85): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 /home/atpinst/public_html/app/code/core/Mage/Cms/controllers/PageController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_PageController), '69')
#8 /home/atpinst/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Cms_PageController->viewAction()
#9 /home/atpinst/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch('view')
#10 /home/atpinst/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /home/atpinst/public_html/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#12 /home/atpinst/public_html/index.php(67): Mage::run()
#13 {main}

Socialengine addon Advanced Events Plugin v4.8.8p2 throwing errror on create

I've got a site set up with the base Socialengine setup going. I've installed most of the SocialEngineAddon suite of plugins, and for some reason, the Advanced Events plugin throws this error when I try and create one ie: example.com/appeals/create I've tried renaming back to the default site-event, but the problem persists, and I'm having trouble debugging this error. Has anyone seen an error like this before? (I'm quite new to Zend/SocialEngine)
exception 'Zend_Form_Exception' with message 'No view script registered with ViewScript decorator' in /home/activism/public_html/application/libraries/Zend/Form/Decorator/ViewScript.php:162
Stack trace:
#0 /home/activism/public_html/application/libraries/Zend/Form/DisplayGroup.php(920): Zend_Form_Decorator_ViewScript->render('')
#1 /home/activism/public_html/application/libraries/Zend/Form/Decorator/FormElements.php(116): Zend_Form_DisplayGroup->render()
#2 /home/activism/public_html/application/libraries/Zend/Form.php(2933): Zend_Form_Decorator_FormElements->render('')
#3 /home/activism/public_html/application/modules/Siteevent/views/scripts/index/create.tpl(294): Zend_Form->render(Object(Zend_View))
#4 /home/activism/public_html/application/libraries/Zend/View.php(108): include('/home/activism/...')
#5 /home/activism/public_html/application/libraries/Zend/View/Abstract.php(890): Zend_View->_run('/home/activism/...')
#6 /home/activism/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(900): Zend_View_Abstract->render('index/create.tp...')
#7 /home/activism/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(921): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/create.tp...', NULL)
#8 /home/activism/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(960): Zend_Controller_Action_Helper_ViewRenderer->render()
#9 /home/activism/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#10 /home/activism/public_html/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#11 /home/activism/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('createAction')
#12 /home/activism/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /home/activism/public_html/application/modules/Core/Bootstrap.php(83): Zend_Controller_Front->dispatch()
#14 /home/activism/public_html/application/libraries/Engine/Application.php(160): Core_Bootstrap->run()
#15 /home/activism/public_html/application/index.php(211): Engine_Application->run()
#16 /home/activism/public_html/index.php(24): include('/home/activism/...')
#17 {main}
Its seems you need to verify license .Contact the Socialengineaddson guys will help you.

error when click add to cart in magento 1.9.1

I am new in magento.i upload my madento site about 2 months ago but now suddenly when i add a product to cart give me this error
Cannot send headers; headers already sent in
/home/roblixsh/public_html/app/code/core/Mage/Shipping/Model/Carrier/Flatrateuk.php,
line 1
Trace:
#0 /home/roblixsh/public_html/lib/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /home/roblixsh/public_html/app/code/core/Mage/Core/Controller/Response/Http.php(107): Zend_Controller_Response_Abstract->setRedirect('http://www.robl...', 302)
#2 /home/roblixsh/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(711): Mage_Core_Controller_Response_Http->setRedirect('http://www.robl...')
#3 /home/roblixsh/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(689): Mage_Core_Controller_Varien_Action->setRedirectWithCookieCheck('checkout/cart', Array)
#4 /home/roblixsh/public_html/app/code/core/Mage/Checkout/controllers/CartController.php(95): Mage_Core_Controller_Varien_Action->_redirect('checkout/cart')
#5 /home/roblixsh/public_html/app/code/core/Mage/Checkout/controllers/CartController.php(260): Mage_Checkout_CartController->_goBack()
#6 /home/roblixsh/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->addAction()
#7 /home/roblixsh/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('add')
#8 /home/roblixsh/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /home/roblixsh/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#10 /home/roblixsh/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home/roblixsh/public_html/index.php(87): Mage::run('', 'store')
#12 {main}
how can i fixed this?
i don't know why give error on my add to cart but finally i found issue.i write a module with Flatrateuk name and after 3 months this module occur error on my site. now i disable this module and problem solved

Magento Admin Config settings won't save

I have a Magento 1.8 installation which was working fine up until yesterday evening at which point changing any config settings in the admin area stopped working.
E.g. If I change 'store name' to anything different and clicking save: it says "The configuration has been saved" in the green bar at the top but the value stays as it previously was.
Checking in phpMyAdmin the value is unchanged, however you can change it manually in phpMyAdmin and this will be reflected in the admin backend.
Switching on developer mode, initially got me the following when I tried to load any page:
Strict Notice: Only variables should be passed by reference in /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2765
#0 /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php(2765): mageCoreErrorHandler(2048, 'Only variables ...', '/home/user/de...', 2765, Array)
#1 /home/user/dev/lib/Varien/Data/Collection/Db.php(483): Varien_Db_Adapter_Pdo_Mysql->prepareSqlCondition('path', Array)
#2 /home/user/dev/lib/Varien/Data/Collection/Db.php(414): Varien_Data_Collection_Db->_getConditionSql('path', Array)
#3 /home/user/dev/lib/Varien/Data/Collection/Db.php(385): Varien_Data_Collection_Db->_translateCondition('path', Array)
#4 /home/user/dev/app/code/core/Mage/Core/Model/Resource/Config/Data/Collection.php(58): Varien_Data_Collection_Db->addFieldToFilter('path', Array)
#5 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(306): Mage_Core_Model_Resource_Config_Data_Collection->addScopeFilter('default', 0, 'general')
#6 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(292): Mage_Adminhtml_Model_Config_Data->_getPathConfig('general', false)
#7 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(221): Mage_Adminhtml_Model_Config_Data->_getConfig(false)
#8 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(334): Mage_Adminhtml_Model_Config_Data->load()
#9 /home/user/dev/app/code/core/Mage/Paypal/Model/Observer.php(134): Mage_Adminhtml_Model_Config_Data->getConfigDataValue('paypal/general/...')
#10 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1338): Mage_Paypal_Model_Observer->loadCountryDependentSolutionsConfig(Object(Varien_Event_Observer))
#11 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Paypal_Model_Observer), 'loadCountryDepe...', Object(Varien_Event_Observer))
#12 /home/user/dev/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('adminhtml_init_...', Array)
#13 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config.php(93): Mage::dispatchEvent('adminhtml_init_...', Array)
#14 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config.php(63): Mage_Adminhtml_Model_Config->_initSectionsAndTabs()
#15 /home/user/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(88): Mage_Adminhtml_Model_Config->getSections('general')
#16 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#17 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/user/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/user/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/user/dev/index.php(87): Mage::run('', 'store')
#22 {main}
Looking up /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2765:
$key = key(array_intersect_key($condition, $conditionKeyMap));
Which made no sense to me, but something to do with MySQL seemed like I might be on the right track... I googled the error and found this: http://www.magentocommerce.com/boards/v/viewthread/266575/ - and tried the suggestion of replacing line 2795 with:
$tmp = array_intersect_key($condition, $conditionKeyMap);
$key = key($tmp);
Which resulted in the following dev mode error:
Method "addJqueryLibrary" is not defined in "Magentothem_Upsellslider_Model_Layout_Generate_Observer"
#0 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1340): Mage::throwException('Method "addJque...')
#1 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magentothem_Upsellslider_Model_Layout_Generate_Observer), 'addJqueryLibrar...', Object(Varien_Event_Observer))
#2 /home/user/dev/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#3 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#4 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#5 /home/user/dev/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#6 /home/user/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(95): Mage_Adminhtml_Controller_Action->loadLayout()
#7 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#8 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#9 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/user/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/user/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 /home/user/dev/index.php(87): Mage::run('', 'store')
#13 {main}
If you switch developer mode off now, the same thing happens, says its saved but no change.
Just found in /var/exception.log another error that says:
exception 'Mage_Core_Exception' with message 'Invalid block type: Fishpig_FPAdmin_Block_Adminhtml_Extend' in /home/pieboy/dev/app/Mage.php:594
(followed by another stack trace)
I'm pretty much at my wits end with what to try next and out of my depth. The store is using a paid for theme which included a lot of extensions which I didn't personally install, but it has been working completely fine up until now.
The most recent extension I installed was this:
http://www.magentocommerce.com/magento-connect/stripe-for-magento.html
As far as I could tell it all went smoothly, and I've been editing config settings since, but it was when I went to enable it in the payment methods area that I noticed the problem.
I know this was a lot of reading, but was just trying to get down all the info. Any suggestions at all on how to debug from here are welcome.
EDIT: I uninstalled Fishpig and Magentothem upsellslider extensions, and now I get no errors or exceptions at all in dev mode but still the same behaviour with config settings not saving.
With the help of my hosting company, we tracked this down to being caused by suhosin, they increased the following suhosin limits in the php.ini file for my server which resolved the issue:
suhosin.post.max_vars = 1000
suhosin.request.max_vars = 1000
(Thought I would update here in case anyone in the same boat googles it!)

Categories