Your SharePoint site collection is about to expire

To extend the expiration date for this site collection, click the link below:
http://url.aspx

Otherwise this site collection, including all of its subsites, might be deleted.

If this site collection is no longer needed, you can delete it by going to http://url.aspx, and selecting “Delete this site”.

Please note – When a SharePoint Web site collection is deleted, all Web sites, content and information which were part of the site collection are completely erased. The site can only be restored if a backup exists.

To update the settings for this alert you will need to venture into Central Administration.
Central Administration > Application Management > Site Use Confirmation and Deletion

Select the Web Application you want to update and then click OK.

SharePoint Designer Blank Lines

How do you remove blank lines in SharePoint Designer?

1. Select / highlight 4 blank rows (select more or less depending on how many you want to delete).
2. Ctrl+H (Edit –> Replace)
3. Replace All

You might have to perform this more than once to truncate all the blank rows.

My .aspx grew from ~1,000 rows to over 300,000 rows.  Why?  I’ll assume it had something to do with the Data View web part.

SharePoint Search Thesaurus TSenu.xml

How do I update SharePoint 2010 or 2007 to search for more than term at a time?  What?

In my example, every time I search for Pizza, I also want to see Taco search results.  This is a two way street.  Search for Taco, I also see Pizza results.

Key word here is synonyms.  And we have two options to play with. Replacement and Expansion Sets.  Replacement = user searches for “top secret” and they see results for “HR company policy”, Replacement allows you to replace search strings with other search strings.  Expansion Sets = user searches for “Taco”, and they get results for Taco, Pizza, Fruit, Cookie…. Expansion allows you to add more words to your searched text.

This KB article goes into greater detail: http://support.microsoft.com/kb/289652

Another helpful link: http://www.codeproject.com/Articles/36203/How-to-Configure-SharePoint-Treasure-Synonym-In-MO.aspx

First I created a Document Library and uploaded two files, Pizza and Taco.

Search for Pizza, and the only think I see are Pizza results.

After updating the TSenu.xml file located at:

Drive:\Program Files\Microsoft Office Servers\12.0\Data\Applications\[SSP Admin Site GUID]\Config\tsneu.xml

to look like this:

<XML ID="Microsoft Search Thesaurus">
<thesaurus xmlns="x-schema:tsSchema.xml">
<diacritics_sensitive>0</diacritics_sensitive>
<expansion>
<sub>Taco</sub>
<sub>Pizza</sub>
</expansion>
</thesaurus>
</XML>

Then do a quick command update:
NET Stop oSearch
NET Start oSearch

I now see results for Pizza and Taco

No need to reboot or do an IISreset.

If you update the xml file and do the NET Stop/Start, but are not seeing expected results.  Try searching for TSenu.xml on your server to make sure you are updating the correct file.

As you can see here, there is more than one XML file on a server.

Note from the KB article:

(For example, the English (United States) version of the thesaurus is TSenu.xml.

If you working in other languages make sure you update the correct XML file.

Alerts not being sent

Create an Alert in a Library and the first email is sent letting you know you have setup the Alert.  Change or update an item in the Library and the Alerts are not being sent…

First I looked in Central Administration at Job History (_admin/TimerJobHistory.aspx) and not noticed nothing had ran in a few days.

Next, I located and ran the Immediate Alerts job.  After the job ran, I refreshed the page and noticed the Last run time: had not updated.

Well something isn’t doing it’s job!

Now, pop over to the Server Manager –> Configuration –> Services and locate the SharePoint 2010 Timer service.   If it’s not running, right-click and select start.

Cruise back over to your Job History page in Central Admin. and refresh the page.

The same solution might apply to SharePoint 2007, but I resolved this in SharePoint 2010.

more info:

http://technet.microsoft.com/en-us/library/ee924649.aspx

***UPDATE***
For some reason Alerts were not being sent from one of our Web Applications.
After digging around the Farm, I learned that that Web App in question, was trying to send Alerts from one of the App servers in the Farm. Why? Not sure yet.

The server that the Web App was trying to send from, was not allowed to relay emails from our SMTP server… Once we added the IP to the SMTP server, the Alerts started alerting.

***** Another Update *****

One of my users reported that Alerts were not being sent to an AD Distribution List (DL).  Turned out someone had messed with the site permissions and set the DL to Limited Access.

The DL you are wanting to alert, needs Read access to the SITE and the List / Library you are creating the Alert on.  Yes, this sorta sucks if you have a ton of Lists / Libraries that inherit permissions from parent.

 

Code blocks are not allowed in this file

I was trying to enable code in an aspx page in SharePoint Designer, with no luck!

(warning, search google for reason not to do this.)

Appears my problem was related to not including the SubFolders option in the web.config file update.

<script><!–mce:0–></script>
<form id="form1"> Current server time is <% =GetTime()%>. </form>

This is the contents of my aspx page in SharePoint Designer (2010).

What web.config file did I update?

C:\inetpub\wwwroot\wss\VirtualDirectories\80

Do I need to run an IISreset?

Nope, I’ve tested this and there is no need for an IISreset.

Spaces count as characters in a file name or url

Question:  Do spaces count toward the total character limit in file or folder names?

Answer: Yes.

How I tested this.

I created a text file and named it

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.txt

The name is a 124 characters long.  Uploaded it to a Document Library and it works.

Now, try adding some spaces to the file name, the re-upload the file.

You will see this error:

The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name.

More info from Joel Oleson’s blog:

File Names

 

  • Invalid characters: ” # % & * : < > ? \ / { | } ~ 
  • Cannot be longer than 128 characters
  • You cannot use the period character consecutively in the middle of a file name
  • You cannot use the period character at the end of a file name
  • You cannot start a file name with the period character

Folder Names

 

  • You cannot use the following characters anywhere in a folder name or a server name:  ~ # % & * { } \ : < > ? / | “
  • Cannot be longer than 128 characters
  • You cannot use the period character consecutively in the middle of a folder name
  • You cannot use the period character at the end of a folder name
  • You cannot start a folder name with the period character

 

update.

More info from Microsoft on this topic:

http://technet.microsoft.com/en-us/library/ff919564.aspx

Replace Hyperlink column with a Button

If you have ever had to deal with unruly hyperlink columns in a List, you know they can be a mess.  What I’ve done is add a button to a column using SharePoint Designer. Then set the buttons path equal to the unruly hyperlink url.

To start this example I created a List then added a Hyperlink column named LongURL.

From the Ribbon click on Edit List to open SharePoint Designer.

Once SharePoint Designer opens, click on All Items in the Views section.

In this step we are going to add a column to the table in the Web Part.  I right clicked in the LongURL column, selected Insert, then Column to the Right.

With the cursor in the row of the new column, click on the Design tab at the top of screen, click on Insert Control, then Form Action Button.

Next we will want to set two of the buttons properties.  Click on the button, the Tag Properties for the button should now be displayed on the right side of SharePoint Designer.  In the Attributes section, you can set the text that appears on the button.  This can be static text or text that is bound to an item in the row.

While still in the Tag Properties, scroll down to Events and look for onclick, this is where we are setting the hyperlink value of the button.   In the onclick field enter:  window.location.href='{@LongURL}’

Now, click save and return to your browser and refresh the page.  You should now see the newly added button.

Safe to assume you want to remove the LongURL column?  Go back to SharePoint Designer.  Click in the column that displays LongURL.  Now, right click, select Delete, then Delete Columns.  Click save, and return to your browser and refresh the page.

Your page should now look like this:

Let me know

Failed to get value of the “Attachments”

Failed to get value of the “Attachments” column from the “Attachments” field type control.  See details in log. Exception message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)..

Open SharePoint Designer, on the left side of the screen click on Lists and Libraries, right click on your broken List, and select List Settings.

In the Settings section –> Advanced Settings section un-check Allow attachments. Save your changes, go back to your page and refresh.

failed to get value of the attachments


 

Filter Major and Minor Versions

Overview of what we are going to do:
Create a Library.
Enable versioning.
Create a new View named Major.
Using SharePoint Designer, convert the Major View to an XSLT Data View.
Apply filtering to the Data View using the Approval Status field = Approved.
Save.
Using the same steps as above, create another View named Minor, and apply a filter for Draft.
Done.

Create a Document Library (I named my MajorMinor) and enable Versioning (Site Settings –> Versioning –> Create major and minor).

Create a new View and name it Major.

Once you have created your new Library, open SharePoint Designer, and open your site.

(File –> Open Site.. )

Now, navigate to your Library, open the Forms folder, and then open the Major.aspx page.

Once the page opens, right click on the Web Part and select Convert to XSLT Data View.

Right click in the Version field –> select Insert –> Column to the Right.

Now look in your Data Source Details Task Pane and locate the Approval Status field.  (If you don’t see the Data Source Details Task Pane, you will want to activate it from the Task Panes menu at the top of your screen)

Once you have located the Approval Status field, drag it into a cell of the column you just added to your Data View.

Now we are going to filter the Data View using our new field.

Click on the Web Part, select the little box in the top right corner of the Web Part, and then select Filter.

Click on Filter, once the Filter Criteria box opens, click on Click here to add a new clause….

From Field Name select Approval Status, Comparison should be Equals, Value is Approved, click Ok to apply the filter.

Save your page (click yes when the warning box opens).

Go back to your browser and refresh the page.  To test your changes, edit and save a document.

Now, to create your Minor View, use the same step shown above, but your filtered value would be Draft.

*NOTE*
1. If your Library has a Workflow attached, you will need to take into account the other Approval Statuses (Pending, Rejected, …)
2. You don’t need to add a new column to the Data View to use the filtering.  You could simply apply the filter without adding the column.