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

Problem progaming a module, block error
 
Gregory Tonon
Member
 
Avatar
Total Posts:  65
Joined:  2008-03-27
Toulouse
 

Hello,
I try to develop a module to manage attributes on customer entity.

I get the code of the Catalog Attribute existing module.

It’s work but when i want to edit a customer attibute i’ve got the following error

Fatal errorCall to a member function getIsAnonymous() on a non-object in /app/code/core/Mage/Core/Block/Abstract.php on line 303

I thinh the problem is in the controller when i add the block into the layout content :

$this->_initAction()
            ->
_addBreadcrumb($id Mage::helper('customer')->__('Edit Customer Attribute') : Mage::helper('customer')->__('New Customer Attribute'), $id Mage::helper('customer')->__('Edit Customer Attribute') : Mage::helper('customer')->__('New Customer Attribute'))
            ->
_addContent($this->getLayout()->createBlock('customerattribute/attribute_edit')->setData('action'$this->getUrl('*/customerattribute/save')))
            ->
_addLeft($this->getLayout()->createBlock('customerattribute/attribute_edit_tabs'))
            ->
_addJs(
                
$this->getLayout()->createBlock('adminhtml/template')
                    ->
setIsPopup((bool)$this->getRequest()->getParam('popup'))
                    ->
setTemplate('customer/attribute/js.phtml')
            )
            ->
renderLayout();

Any ideas ?
Thanks for the reply

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gregory Tonon
Member
 
Avatar
Total Posts:  65
Joined:  2008-03-27
Toulouse
 

I found the error

I post the solution if someone is interested

In my module, i bad-named the controller associated ( Attribute/Edit.php)

$this->_controller 'attribute';
 
Magento Community Magento Community
Magento Community
Magento Community
 
Anna Perena
Member
 
Total Posts:  41
Joined:  2008-06-07
 

Have you released you module? I’m very interested and I’m sure others will be wink

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