Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

deleting reviews and after a few i started getting this…
 
Dash505
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-09-16
 

I started to get this error when i try to delete any “SAMPLE” data review:

tice: Undefined variable: customerText in /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php on line 76
Trace:
#0 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php(76): mageCoreErrorHandler(8, ‘Undefined varia...’, ‘/nfs/c03/h02/mn...’, 76, Array)
#1 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(94): Mage_Adminhtml_Block_Review_Edit_Form->_prepareForm()
#2 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(642): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#3 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#4 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml(’form’, true)
#5 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php(103): Mage_Core_Block_Abstract->getChildHtml(’form’)
#6 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/design/adminhtml/default/default/template/widget/form/container.phtml(32): Mage_Adminhtml_Block_Widget_Form_Container->getFormHtml()
#7 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Template.php(144): include(’/nfs/c03/h02/mn...’)
#8 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView(’adminhtml/defau...’)
#9 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#10 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#11 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#12 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Text_List->_toHtml()
#13 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#14 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml(’content’, true)
#15 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/design/adminhtml/default/default/template/page.phtml(73): Mage_Core_Block_Abstract->getChildHtml(’content’)
#16 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Template.php(144): include(’/nfs/c03/h02/mn...’)
#17 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView(’adminhtml/defau...’)
#18 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#19 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#20 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Model/Layout.php(515): Mage_Core_Block_Abstract->toHtml()
#21 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(326): Mage_Core_Model_Layout->getOutput()
#22 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php(74): Mage_Core_Controller_Varien_Action->renderLayout()
#23 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(349): Mage_Adminhtml_Catalog_Product_ReviewController->editAction()
#24 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(143): Mage_Core_Controller_Varien_Action->dispatch(’edit’)
#25 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#26 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/app/Mage.php(447): Mage_Core_Controller_Varien_Front->dispatch()
#27 /nfs/c03/h02/mnt/50821/domains/mydomainishere.com/html/index.php(52): Mage::run()
#28 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
ogweewee
Member
 
Total Posts:  47
Joined:  2008-10-20
 

Hi
I have a customer that is having the same issue when trying to delete a review. They are on version 1.3.1.
Does anyone know how to resolve this?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
ogweewee
Member
 
Total Posts:  47
Joined:  2008-10-20
 

If anyone can respond that would be great.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
pollence
Member
 
Avatar
Total Posts:  55
Joined:  2009-05-19
Australia
 

hello i am also having same problem with deleting reviews. have anyone get solution for this ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
dbd
Jr. Member
 
Total Posts:  6
Joined:  2009-10-12
 

Also having this problem. Anyone found a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ckosny
Guru
 
Total Posts:  349
Joined:  2009-02-28
Luxembourg
 

Having checked the code in the mentioned file I assume that this error might occur if you try to delete a review of a customer whose customer account has been removed. I have not verified this - I am to lazy to create some customers and reviews or install the sample data…

Be that as it may - if you know a tiny bit of PHP simply go to the file /app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php. There add the line

$customerText = ‘unknown’;

directly at the beginning of the function _prepareForm.

That should be it.

Please note that I have not tried this, so no guarantees. And as always - make a backup of the file before you change it.

Good luck

Claudia

PS: If this should fix the issue, could you please post this fact here? This way other people might find the solution

 
Magento Community Magento Community
Magento Community
Magento Community
 
dbd
Jr. Member
 
Total Posts:  6
Joined:  2009-10-12
 

Just an update on my situation, which might help others. The reason this was causing problems for me was because I was trying to remove all the sample data on an already active/ish website. I was looking for a quick way to delete reviews in bulk (which, clumsily, is not an option in the current version of Magento).

In then end what I did was installed a fresh copy of Magento with no sample data, went into the fresh database (using phpMyAdmin) and exported just the tables for Reviews and Ratings. I then went to the database of my “live” site that is having the troubles and dropped those exact same tables from the database. And finally, I simply imported the exported tables from the fresh database.

That seems to have cleaned up my problem (and didn’t involve hacking any core files).

DBD

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top