Friday, May 27, 2011

Content Editor Webpart Error On Page

Issue: Unable to move Content Editor webpart from one place to another. We get the following error message "Error On page" on the Bottom left of the IE.
Or
After moving the content Editor webpart , when we click Exit edit mode . It gives "Unexpected error has occured".

 

Cause: This usually happens whenever we copy the HTML code from one Content Editor webpart to another. When we copy the HTML code it also copies the Webpart ID and it conflicts.

Resolution: Open the Site in Firefox\Chrome browser as IE will not give you the Drop down to edit the webpart
Modify the Content Editor Webpart
Open the Source Code
Remove the following Tag from the code for eg:- "id=WebPartWPXX WebPartID="XXXX-XXXX-XXXX-XXXX-XXXXXXXX"
Click Apply - OK
You can then move the webparts without any issues



Content Editor Webpart Movement

IssueUnable to move Content Editor webpart from one place to another. We get the following error message "Error On page" on the Bottom left of the IE.
Or
After moving the content Editor webpart , when we click Exit edit mode . It gives "Unexpected error has occured".

CauseThis usually happens whenever we copy the HTML code from one Content Editor webpart to another. When we copy the HTML code it also copies the Webpart ID and it conflicts.

ResolutionOpen the Site in Firefox\Chrome browser as IE will not give you the Drop down to edit the webpart
Modify the Content Editor Webpart
Open the Source Code
Remove the following Tag from the code for eg:- "id=WebPartWPXX WebPartID="XXXX-XXXX-XXXX-XXXX-XXXXXXXX"
Click Apply - OK
You can then move the webparts without any issues

Monday, May 23, 2011

PWA always logged in as System Account

Issue:
Some days back one of my friend faced a weird issue, whenever he opened the PWA, it gets logged in as System Account user and not with windows user.
This happens even logged in as Different user using my window account and closed my session/browser.
And again when he re-opened the PWA, again logged in as System account.
 Resolution:
Check following settings in IE
IE options > Security > Local Intranet > Authentication > Custom Level > User Authentication > Prompt for user name and password
Another thing may cause the issue is the System Account credentials have been stuck in machine so to remove it
  • Navigate to the control panel on your local machine.
  • Select User Accounts
  • Select Manage Your Credentials (Windows 7).  May have been “Advanced”
in other Windows versions.
  • Remove the credential tied to the site
While the time I am posting this post I have one question in my mind is that what if the current user from SharePoint site hasn’t access to PWA site.
Please let me know if you have any queries.

Auto forward Emails from Outlook to SharePoint Document Library

Some days before one of my client wanted to auto forward outlook emails to one of SharePoint document library. I ran through following steps to achieve the given task.
  • Make sure Target Doc Lib contains Email address and it’s working
  • Then go to Outlook and click on New > Contact
  • Add Email address of that document library into the Outlook Contacts.
  • Save it and now create a rule from Outlook > Tools > Rules and Alerts > New Rule
  • Select “Start from a blank rule” option.
  • Select Check messages when they arrive > Next
  • Select “Condition” for which you want to forward emails to Doc Lib in step 2.
  • Then select action “forwards it to people or distribution list” and click on people or distribution list
  • Select “Outlook Address book” from Address Book drop down and you will getSharePoint Document Library email address as a contact > Add it
  • Click on Next > Finish
Now send an email with that condition to check rule.
Feel free to ask me if you have any questions.

Tuesday, May 17, 2011

Search Error – ‘Cannot create a file when that file already exists


When try to start manual crawl got following error
Error:
‘Cannot create a file when that file already exists’ upon trying to run an index
Event view log:
The Execute method of job definition Microsoft.Office.Server.Search.Administration.IndexingScheduleJobDefinition (ID 31df2d41-6991-4fe7-8e4b-683c913cdbe5) threw an exception. More information is included below. Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)
ULS log:
CGatherer::CreateCrawlFromStartAddressList: CRAWL_ACQUIREID failed. m_dwProjectID=1, dwCrawlStatus=5 – File :\office\source\search\search\gather\server\gatherobj.cxx Line:6562
Resolution:
  • Check service account for “Office SharePoint Server Search” in services.msc.
  • Change it to “Local System Account” or use Farm Admin account to run the service.
  • Restart the OSearch service from service.msc and also from Central Admin.
Please let me know in case of any queries.

Exclude crawling content based on creation date


Scenario:
One of my colleagues wants to exclude file / documents from the search result based on their creation date.
Steps taken to achieve:
There is a provision in MOSS 2007 to exclude specific contents from indexing using Crawl Rule. But it’s not possible to exclude contents based on creation date.
We have set - Information management policy on a doc lib and set Expiration policy which will start the workflow and move documents to another doc lib (i.e. Archive) based on their creation date
(To create custom workflow to move doc from one lib to another please refer
And on Archive Doc Lib select “No” to appear in search result option which will not crawl the content of that doc lib.

Question sequence is disordered when we export a survey list to excel

Issue:


Question sequence is disordered when we export a survey list to excel

Resolution – Only to get questions in proper sequence in Excel sheet!!


  • Checked Survey settings

  • Found there were total 50 questions and found almost 30 questions were created using“Rating Scale“ category

  • Changed question ordering from Survey settings > Change order of questions

  • Previously it was from Q-1 > Q-1-a….Q-5 > Q-5-e

  • Changed it to reverse order and arranged Q-5-e > Q-5…..Q-1-a > Q-1

  • Exported to spreadsheet, and got all the questions in right order.

  • Now another issue occurred, Q-6 (Multiple Line of Text) came first in datasheet, so from view removed it to be displayed or to be exported to spreadsheet.

  • The other issue noticed was when user clicks on “Respond to this survey”, user will get the same reverse orders of questions (i.e. Q-5, 4, 3, 2, 1, 6)

  • Though this helps us to get questions in proper sequence only in Spreadsheet but this cannot be implemented as this occurs disordering of questions in survey.


Found 2 alternate workarounds

Workaround 1


  • Changed all “Rating Scale” questions to “Choice” category with “Radio button” & fill in “mandatory” option

  • Order remained same (i.e. Q- 1, 2, 3, 4, 5, 6)

  • Now it worked proper for both scenarios, user got the right order when open “Respond to this survey” and also got the right order when exported to excel.


Workaround 2


  • Created a page and added a Data View Web part using SPD on the page

  • Used SharePoint survey as a Data source and added all questions / columns in to the web part

  • Then from Data view web part exported data to excel