Unable to add selected web part
By peter.stilgoe
Unable to add selected web part(s)
QueryListPart: A Web Part or Web Form Control on this page cannot be displayed or imported. The type could not be found or it is not registered as safe.
- Make sure the webpart is registered as safe in the web.config
- Make sure the assembly is accessible and in the bin folder
- Make sure the assembly name in the *.webpart definition file, matches the assembly name in the safe control element in web.config
- Make sure you don’t have more than one *.webpart file for the same web part in the web part catalog. This may happen if you changed the name of the *.webpart file.
- Restart IIS to start clean. Attach the debugger to the w3wp.exe process and try to load the page with the rogue web part. This way you can determine the exact location of the assembly you are loading.
- Check if the web part class exists by opening the assembly with reflector. This might sound funny, but in a bigger team, when different versions of assemblies are flying around it is very easy to overlook something and to use the wrong version, which so happens does not contain the web part class at all.
Thanks to http://www.mikhaildikov.com/
How to Prevent users from changing views in Sharepoint
By peter.stilgoe
If you need to prevent users from seeing the view menu allowing them to pick which views they want to use you can remove this easily by:
Browse to the relevant list or library
Click Site Action and select Edit Page
On the Web Part Click edit –> click Modify Shared Web Part
Change Toolbar to either ‘Summary’ or ‘No toolbar’
Now your users won’t be able to view the select ‘View’ dropdown menu
Sharepoint Javascript Error: ‘style.display’ is not null or not an object
By peter.stilgoe
If you are receiving the following error when trying to access the ‘edit’ menu of a webpart on a page:
‘style.display’ is not null or not an object
It is likely that you have some random/extra code in another webpart on the page, this typically happens if you cut & paste text from another location onto the page & it also brings over some formatting chars which upsets Sharepoint. Either:
a) Remove the offending text from another webpart on the page
b) Use something other than IE like Firefox or Google Chrome, typically using another web browser you will be able to edit the troublesome webpart.
How to add extra fields to your CQWP that dont display as standard
By peter.stilgoe
1) Export your Content Query Web part to your desktop
2) Open it with Notepad and look for the following line of code:
3) Change this line to the following, and replace the portion MYINTERNALCOUMNNAME with the internal column name for your column
4) Save your file
5) Import the web part
- Edit page
- Add Web Parts
- Switch to advanced
- Switch from browse to import
- Browse to your file and upload you file
Now when you go to apply a filter, you will see your custom column.
Formatting Text / Questions in Sharepoint Surveys
By peter.stilgoe
If you have ever tried to format text and / or insert line breaks into your questions in sharepoint surveys, you’ll know its not an easy task. However by adding some simple javascript you can format the text in your questions as you want.
Basically at the bottom of your survey page add a Content Editor Webpart & insert the follow script:
You will see the script is mapping your HTML standard HTML command to keywords to trigger your formatting.
So say you wanted your question to appear in italics, you would edit your question as normal but insert the italic keyword triggers ie.
How old are you?
To appear in italics you would write the question as:
startitalic How old are you? enditalic
Now your question will appear in italics and so on……..
If you cant edit your survey page to add you CEWP see the previous post on how to edit this page.
Need to edit a sharepoint page but there is no edit option
By peter.stilgoe
You need to edit a page in Sharepoint but the ‘Edit’ option is greyed out for example on a survey page.
Simply append NewForm.aspx with ?ToolPaneView=2 so it looks like
You now have your page in edit mode so you can add webparts etc
Content Type Toolbar Web Part
By peter.stilgoe
The Content Type Toolbar is a simple add-on that will enhance the use of SharePoint Content Types in large deployments.
The use of content types in SharePoint 2007 has a number of benefits and businesses may spend a considerable amount of time planning and deploying content type to help support their business processes. Unfortunately, the default methods of using content types may not be intuitive for most users who do not have experience with SharePoint. This problem will lead to content types not being used or being neglected by the end users. This can be avoided by training your end users, but it may be sometime before all your users receive the appropriate level of training, so in the meantime the content types are still neglected.



May 21st, 2010

![Recommend [pstilgoe]](http://s3.amazonaws.com/arkayne-media/img/badge/logo-recommend-badge-medium.png)