Thursday, July 28, 2011

Blog Category not working as expected

Problem Description: Submit a post under Blog site and Tag it with any Category.


(Categories is a list which is present in the Blog site by default)

Once the post is Tagged, publish it.

Now when you view the Post click on the Category as shown in the below screen shot.

Once you click on it , it will take you to category.aspx page where it will show you all the POSTS tagged to that particular Category.



-




Issue: When you click on any category from Blog Post , it returns a blank page. No Posts, no webparts, even if the category is tagged properly.




Cause: Posts Webpart is deleted from the Category.aspx - /Lists/Categories/Category.aspx




Resolution: Adding a Normal post webpart on the above page won't work , as that will display all the posts that List. The main functionality of the category.aspx page is to display the Posts only related to that particular Category on which you clicked on.

To achieve this , please follow the below steps:
- Open the following URL - /BLOG/Lists/Categories/Category.aspx- Site Actions - Edit page

- Click on Add Webpart

- Now we have to add 2 webparts

- Query string (URL) Filter and POSTS webpart

- First we will modify the Query String webpart , change the Filter name & Query String Parameter name to "NAME", as we will filter the Posts webpart using that field


















- Now modify the Posts webpart

Click on the drop Down

-Modify Shared webpart

-Connections Send Filter values to POSTS

Once you Set up a connection - You will get a Little popup - Select Category from that and Click on OK
Select Apply - OK

Exit Edit Page Issue resolved

Blog Category not working as expected

Problem Description: Submit a post under Blog site and Tag it with any Category.


(Categories is a list which is present in the Blog site by default)

Once the post is Tagged, publish it.

Now when you view the Post click on the Category as shown in the below screen shot.

Once you click on it , it will take you to category.aspx page where it will show you all the POSTS tagged to that particular Category.



-




Issue: When you click on any category from Blog Post , it returns a blank page. No Posts, no webparts, even if the category is tagged properly.




Cause: Posts Webpart is deleted from the Category.aspx - /Lists/Categories/Category.aspx




Resolution: Adding a Normal post webpart on the above page won't work , as that will display all the posts that List. The main functionality of the category.aspx page is to display the Posts only related to that particular Category on which you clicked on.

To achieve this , please follow the below steps:
- Open the following URL - /BLOG/Lists/Categories/Category.aspx- Site Actions - Edit page

- Click on Add Webpart

- Now we have to add 2 webparts

- Query string (URL) Filter and POSTS webpart

- First we will modify the Query String webpart , change the Filter name & Query String Parameter name to "NAME", as we will filter the Posts webpart using that field


















- Now modify the Posts webpart

Click on the drop Down

-Modify Shared webpart

-Connections Send Filter values to POSTS

Once you Set up a connection - You will get a Little popup - Select Category from that and Click on OK
Select Apply - OK

Exit Edit Page Issue resolved

Wednesday, July 27, 2011

The column name you have entered is already in use or reserved. Choose another name


I have faced very interesting issue last night.One of the users had changed / renamed the default content type “Title” to “Item Title” and when he tried to pull it back it gave an error – “The column name you have entered is already in use or reserved. Choose another name”
After modifying default name to custom name he realized that “Title” name had been changed to all over sites because on site all lists / libraries were inherited from parent content type. As a farm admin I even tried with no luck and got the same error.
There is a small JavaScript we have to run in browser which clears all the values in the forbidden column collection array and gives you a confirmation
And after running following JavaScript I got rid of that issue.
javascript:g_FieldName={};alert('Successfully cleared forbidden columns');

Rename wiki page title in MOSS 2007 / SharePoint 2010 without changing site URL

In Wiki pages if you change the page title it will also change the site URL.
So if you have put it as a reference on any site that link will be broken
Here is the method I have successfully used to change the page title without changing the site URL
  • Open the SharePoint site in SharePoint Designer

  • In Design mode select the page title, and rename it

  • Here I have found very weird behavior that in code window <title> parameter is missing so to generate <title> parameter remove Page Title from the design view

  • Page title is associated with “SharePoint:ListItemProperty”, so when we remove page title from the page this parameter will be removed in the code <SharePoint:ListItemProperty runat=”server”/>

  • Now in the design window add your own title which will generate <p> your title </p> parameter in code and you can refer this parameter for any future changes.

You can hide the page (Wiki page) title by simply adding comment “<!-- <p> title </p> -->”
Feel free to reach me in case of any queries.