Saturday, September 8, 2012

Content editor web part’s menu is not opened in Sharepoint site

Sometimes on the publishing pages with content editor web parts you may encounter with the problem, that menus of some web parts are not opened, while another web parts still work properly. I.e. if you need to add/edit/remove some content from web part the only way is to copy content from browser, then close or delete web part from maintenance page (which is opened if you add “?contents=1” to the url of the current page, e.g., add new web part and insert copied content there. However it may not fix the problem, i.e. when next time you will come to the page in order to edit it, you may face with the same problems. How to fix it?

In most cases such problems are related with content which is inserted to the web part. E.g. it may look Ok for end users, but not have correct html. In order to check it, run IE developer tools javascript console, start debugging and see whether or not there are any javascript errors when you open web part’s menu. If content is incorrect you may get the exception:

Error: 'style.display' is null or not an object.

which occurs in MSOWebPartPage_OpenMenu() function from ie55up.js file on the following line:

   1: if(minOption)
   2: {
   3: = (WebPart.getAttribute('allowMinimize')=='false' ||
   4:'none') ? 'none' : '';
   5: }

In order to fix the problem copy content without formatting (e.g. into notepad), then close problematic web part, add content to the new web part and re-apply formatting. Save changes and check web part’s menu after that. It should be opened successfully so you will be able to continue working with your web parts in regular way.

No comments:

Post a Comment