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

Registry Key ‘RID’ Already Exists - Is my fix breaking something? 
 
Ionix
Jr. Member
 
Total Posts:  24
Joined:  2010-09-29
 


Hello,

I recently upgraded from 1.5.1.0 => 1.7.0.2 and while trying to set up a Soap/XML web service role I got the error “Registry Key ‘RID’ Already Exists” when saving, and the error also repeats when trying to edit a web service role as well.

Diving into /code/core/mage/adminhtml/block/api/role/grid.php I found where the RID key is defined on the function _prepareCollection():

protected function _prepareCollection()
    
{
        $roleId 
$this->getRequest()->getParam('rid');
        
Mage::register('RID'$roleId);
        
$collection Mage::getModel('api/roles')->getUsersCollection();
        
$this->setCollection($collection);
        return 
parent::_prepareCollection();
    
}

To work around this and get it to allow access to the Web Services Roles I copied the file over to /code/local and commented out the first two lines in the function:

protected function _prepareCollection()
    
{
        
//$roleId = $this->getRequest()->getParam('rid');
        //Mage::register('RID', $roleId);
        
$collection Mage::getModel('api/roles')->getUsersCollection();
        
$this->setCollection($collection);
        return 
parent::_prepareCollection();
    
}

Now it allows me to edit/save a role without throwing the error, but I’m wondering just what kind of unforeseen consequences this may cause, and if I’m just causing/covering up a bigger problem. Any knowledgeable input would be greatly appreciated, thanks.
 
Magento Community Magento Community
Magento Community
Magento Community
 
JJLaird
Jr. Member
 
Total Posts:  11
Joined:  2011-08-09
 

I am also having this same problem any response would be great.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dowsonlu
Jr. Member
 
Total Posts:  1
Joined:  2009-12-19
 

Got the exact same problem. Is there any new solution to it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
nohart
Member
 
Total Posts:  62
Joined:  2012-10-09
California
 

I have the same problem has anyone found an answer to this? I have searched Google and cant find an answer…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hiboo
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2012-07-24
 

You must all have the “Enhanced Admin Grids” module installed.

If that’s the case, this is your solution: Admin Grid Breaks SOAP/XML

You can Change your grid.php back to its original

Hope that helped.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nohart
Member
 
Total Posts:  62
Joined:  2012-10-09
California
 

Awesome! Thank you so much for helping! That was my problem. This is a great extension but it does have a few issues.

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