Hopefully an easy fix with the admin category section

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

 

To be able to add a subcategory to an existing category you need to be able to click the category. When you click it, it should turn light orangish red. When I click mine it doesn’t respond. When I double click it then it will expand, but still won’t be clicked so that I can create a subcategory.

So basically it won’t let me select any of the categories in the admin so I can’t add any categories, any subcategories, or edit any existing categories.

Any ideas?

 

Update -

If I click a category and hold the click for about 2 seconds then it will color it as if it was selected. But still not selected.

 

Sounds like a js problem, but first:
* What version Magento?
* Does it make a difference using a different browser?
* Installed on WAMP or a remote server?
* Any changes made recently?
* any similar symptoms elsewhere in admin?

Regards

 Signature 

Neil Atwood
Ministry Grounds Coffee
Micro-roaster and premium green coffee for home roasters.
Twitter: twitter.com/ministrygrounds
Facebook: Facebook.com/ministrygroundscoffee

 
NeilA - 29 January 2011 02:50 PM

Sounds like a js problem, but first:
* What version Magento?
* Does it make a difference using a different browser?
* Installed on WAMP or a remote server?
* Any changes made recently?
* any similar symptoms elsewhere in admin?

Regards

Version 1.4.2

Same issue in newest version of Firefox, newest version of Chrome, and IE9.

This is an active site that has been online for a couple years. Upgraded to 1.4.2 a month ago or so.

Only change would be an update to an ajax extension for adding products to the cart.

I checked the product pages and admin order pages and things seem to work. On the same category page I can create a new category in the root by just filling in the new category information that loads when you go to the manage categories page. So all the buttons in the admin work, all the javascript works, except for choosing categories in the little category tree. I can expand and collapse the category tree, but I can’t actually select a category for editing or creating subcategories within the selected category.

 

I should note though that the ajax extension was updated on a dev version of the site that is an exact copy. The categories work fine on the dev site after this ajax extension upgrade. So the ajax extension was the only change since the categories worked previously, but this upgrade didn’t affect the dev site so I don’t think it is relevant.

 

So… if you can create a root category, why not then just drag and drop it to the sub category that you want it in?
I realise it’s not a total fix, but it can get you going…

Perhaps in the meantime someone else with more js experience will have a better solution.

Regards

 Signature 

Neil Atwood
Ministry Grounds Coffee
Micro-roaster and premium green coffee for home roasters.
Twitter: twitter.com/ministrygrounds
Facebook: Facebook.com/ministrygroundscoffee

 
NeilA - 29 January 2011 03:06 PM

So… if you can create a root category, why not then just drag and drop it to the sub category that you want it in?
I realise it’s not a total fix, but it can get you going…

Perhaps in the meantime someone else with more js experience will have a better solution.

Regards

Because I can only create categories in the root. I can’t interact with them. I wouldn’t be able to drag it anywhere…

 

Found someone that was able to figure this out. He says he found an error that was trying to call a method on a javascript object that never was created. He commented out the two calls on the object and problem fixed.

 

I have the same problem. Can you please tell me which file and code was commented

 

It’s a JavaScript error that causes this. I was able to take care of it by commenting out (essentially removing) 2 lines in the edit.phtml file calling a toolbarToggle object.

File: app/design/adminhtml/default/default/template/catalog/category/edit.phtml

line 75 toolbarToggle.stop();
line 94 toolbarToggle.start();

So, basically, it’s something like this:

function updateContent(urlparamsrefreshTree{
        
if (!params{
            params 
{};
        
}
        
if (!params.form_key{
            params
.form_key FORM_KEY;
        
}

/* Throws error (undefined ojbect) at Catalog : Manage Categories page
 *       toolbarToggle.stop();
 */

       /*if(params.node_name)
       {
           var currentNode = tree.getNodeById(tree.currentNodeId);
           currentNode.setText(params.node_name);
       }*/

        
var categoryContainer = $('category-edit-container');
        var 
messagesContainer = $('messages');
        var 
thisObj this;
        new 
Ajax.Request(url + (url.match(new RegExp('\?')) ? '&isAjax;=true' '?isAjax=true' ), {
            parameters
:  params,
            
evalScriptstrue,
            
onComplete: function () {
                
try {
                    
if (refreshTree{
                        thisObj
.refreshTreeArea();
                    
}
/* Throws error (undefined ojbect) at Catalog : Manage Categories page
 *                   toolbarToggle.start();
 */
                
catch (e{
                    alert(e
.message);
                
};
            
},

My upgrade path was 1.4.1.1 to 1.4.2.0.

Towards the bottom of this post here is basically the same solution:

http://www.magentocommerce.com/boards/viewthread/213517/#t287035

 

Thanks for posting this solution, it also works for version 1.6.2.

`Reply Or Comment!
Please LogIn to Reply!