Monthly Archive March 2012

AvatarByRashid Aziz

SharePoint 2010 rich text editing tool styles

I came across a scenario where my client wants SharePoint extranet site contents look and feel consistent. The site have many sub sites and which lot of publishing pages, editors can create pages, add content editor web part and add contents.

The request routed to me about deleting some custom styles from content editing tool and adding some new ones.

Solution

Open the current “Master” page in SharePoint 2010 designer.

Click “Style” tab from designer menu and select “Manage styles”

Right click any CSS style from” Manager Style” list  and select “Go to code”

The core CSS file has all styling references ; the style starts with name “.ms-rteStyle”.

Create new styles as

.ms-rteStyle-stylename

{-ms-name:"Eblogin Style"; color:#00adee;}

Save the Core.css file

Note: YOU CAN ALSO DELETE THE EXISTING STYLES BEFORE SAVING THE CSS FILE

Open the SharePoint site and go to a page which has content editor web part.

Edit any content inside the content editor web part and try to select the style from editing tool. You will see new style as shown below

AvatarByRashid Aziz

Potentially excessive number of SPRequest objects, SharePoint error

I got this error in ULS log file while using one SharePoint application which was developed by third party. I have checked the code and it was disposing the SP objects correctly.

The site was running really slow, and it takes about 40 seconds to load the home page.

Site structure:

Our application has 5 sites under a site collection and about 500 sub sites underneath those 5 sites.

Reason of error:

The “show subsites” option in navigation setting was checked, so when the page loads it also load 5 sites in navigation menu and all 500 sub sites links as a dropdown link menu. The navigation menu is shipped with SharePoint product, the way it is designed that it use SP Request object to build each navigation link and doesn’t dispose those object automatically (Reason: if the page do refresh, it does not need to re-create all object again)

Resolution:

Go to site collection home page

Click site action> site settings

Click “Navigation” link under “Look and Feel” section

Uncheck “Show sub sites” under “global navigation” and “current navigation” as shown below

If you need that navigation link for all sub sites should be available for user, think about other ways to getting this functionality (e.g. custom navigation), or reconsider your application structure.

Results:

After doing the above changes, I did not see any log saying “Potentially excessive number of SPRequest objects“. Also site performance increased dramatically as the home page loads in 4 seconds. J

Hope this will help.