Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I get this error in the log. Its a custom ribbon button that opens a dialog with a custom application page. I checked the 14 hive and the aspx is there.

So, i dont know what else to check

Medium      Name=Request (GET:http://xxx/workspaces/yyy/Wiki/_layouts/mycompany/MoveWikiPages.aspx?items=%7C2&source=%7B02F2CF4F-4764-41F3-8819-3059620C56FE%7D&IsDlg=1)    b03c3f87-ddc6-4f93-849c-3b838cfdbab4
04/16/2012 13:59:59.76  w3wp.exe (0x0F08)                           0x1568  SharePoint Foundation           Runtime                         tkau    Unexpected  System.Web.HttpException: Could not load type 'MyCompany.WebTemplates.Layouts.MyCompany.MoveWikiPages'.    at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)     at 

The ribbon button executes this:

 <CommandUIHandler
         Command="OpenMoveDialogBox"
         CommandAction="javascript:              
              var ctx = SP.ClientContext.get_current();
              var items = SP.ListOperation.Selection.getSelectedItems(ctx);
              var myItems = '';
              var k;

              for (k in items)
              {
                myItems += '|' + items[k].id;
              }

              var options = 
              {              
                url: '{SiteUrl}/_layouts/MyCompany/MoveWikiPages.aspx?items=' + myItems + '&amp;source=' + SP.ListOperation.Selection.getSelectedList(),
                tite: 'My Company- Move Pages',
                allowMaximize: false,
                showClose: false,
                autoSize: true,
                //width: 400,
                //height: 400 ,
                dialogReturnValueCallback: Function.createDelegate(null, function (result, returnValue) 
                {
                  if (result == SP.UI.DialogResult.OK) 
                  {
                      if (returnValue == null) 
                      {
                          SP.UI.Notify.addNotification('Operation successful');
                          SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
                      }
                      else 
                      {
                          SP.UI.Notify.addNotification('Operation successful');
                          location.href = returnValue;
                      }
                  }
                })
            };             
            SP.UI.ModalDialog.showModalDialog(options);"
            EnabledScript="javascript:function GetSelectedItems()
            {
                var items = SP.ListOperation.Selection.getSelectedItems();
                for (var i =0; i &lt; items.length; i++)
                {
                        if (items[i].fsObjType == 1)
                             return false;
                }
                return true;
            }
            GetSelectedItems();"/>
      </CommandUIHandlers>
share|improve this question
    
I was comparing the mastrpages of the environments, and the only difference I found its SP.js and CUI.js are missing, that might be the problem. –  Esteban V Apr 16 '12 at 13:03
    
Could you try to open the url "xxx/workspaces/yyy/Wiki/_layouts/mycompany/…; directly and see if you still get an error? Based on the message you are getting, it would seem that the problem is in the get request to the page, not in the ribbon button functionality. –  SPArchaeologist Apr 16 '12 at 13:31
    
the page works if I open it manually –  Esteban V Apr 16 '12 at 13:38

1 Answer 1

up vote 1 down vote accepted

I answer my self.

Actually the problem my colleague was having, is that when he took my functionality, he changed the name of the files to match his needs.

When the filenames were changes, he forgot to change the Inherits attribute of the page in the aspx file.

Hard to find, but that was the problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.