Friday, November 14, 2008

Be careful if plan to modify list items NEWitem.aspx !!!!!

Error message when you click "New" to create a new item in a list or when you click an existing item in SharePoint Server 2007 or in Windows SharePoint Services 3.0: "Invalid page URL" or "An unexpected error has occurred"
View products that this article applies to.
Article ID : 935504
Last Review : June 5, 2007
Revision : 2.2
SYMPTOMS
Consider the following scenario. You use Microsoft Office SharePoint Designer 2007 to customize the NewForm.aspx page of a list in a Microsoft Office SharePoint Server 2007 site or in a Microsoft Windows SharePoint Services 3.0 site. Then, you connect to the list by using a Web browser. In this scenario, you experience the following symptoms:• If you click New to create a new item in the list, you receive the following message:
Invalid page URL:
• If you click an existing item in the list, you receive the following error message:
An unexpected error has occurred
Additionally, you might view the properties of the list in SharePoint Designer 2007 and then specify the NewForm.aspx page in the New item form box. When you do this, the NewForm.aspx page appears to be saved as the new item form when you click OK. However, the next time that you view the properties of the list, the New item form box is empty.
Back to the top

CAUSE
This issue occurs if you deleted the List Form Web Part from the NewForm.aspx page.
Back to the top

RESOLUTION
To resolve this issue, delete the list, and then re-create it. Then, customize the NewForm.aspx page. When you customize the NewForm.aspx page, make sure that you do not delete the List Form Web Part.
Back to the top

MORE INFORMATION
If you want to customize the controls that appear on the NewForm.aspx page, and if you do not want to show the default List Form Web Part, you can hide the List Form Web Part. To do this, follow these steps: 1. Start SharePoint Designer 2007, and then open the NewForm.aspx page for the list.
2. Right-click the List Form Web Part, and then click Web Part Properties.
3. Expand Layout, click to select the Hidden check box, and then click OK.

Tuesday, November 11, 2008

Serverexpress 2008 and sharepoint - contextual search issue



Found this to explain my problem, with the search web part i can redirect any normal scope search to go to serverserver express results page, however when you choose a contextual search (ie this list) which refers to the list or document/picture library you are on the results are always displayed on the OSSearchResults.aspx page... you cannot touch this page as is a system page (unsupported if you do).


Solution: dont use contextual search, set up a scope say 'research documents' , set a rule agains tit to look a this document library using content source = local sharepoint content. Then set up another rule forcing it to look at web folder /research documents/. Change search box in the document library to use scopes not contextual and point advanced and results to use your custom ones for search server.

Monday, November 10, 2008

Document Libary - opening document in a new window

Best way to do this is

Add content editor web part..ENSURE THIS IS THE LAST WEB PART AT BOTTOM OF PAGE WITHIN THE WEB ZONE OF DOCUMENT LIBRARY ....

ADD THIS JAVASCRIPT TO IT...AS PER




Friday, November 7, 2008

Issue with links web part opening new window - does not save

Tried editing the target attribute for the links web part for an item in xlst mode,
right clicked on the field and set target to new window e.g. _blank and saved it.
It did not save!!!!

Solution , click on url field and edit target property in the 'Tag properties' window instead!!!! works a treat, no idea why other method does not work.

Monday, October 27, 2008

Creating a small neat Sharepoint Calendar

The Sharepoint calendar in calender view sucks, it is way too big

Found a good solution here:
>

Basically drop a calendar control into web zone, add a contend editor control with it and add this to it :







Wednesday, October 15, 2008

Get the links webpart to open in a new window

Tried to use the links web part as it was on my intranet, turns out does not by default open up in a new window!

Found an easy solution rather than some suggestions to modify schemas and the like (yuck!)





1. Open the site in sharepoint designer.
2. Select the Links webpart and convert it into XSLT Data View
3. Then, select any one of the link in Links webpart and right click you will find Hyperlinks Properties option, Click on that
4. It will open Edit Hyperlink dialogue. Click on the Target Frame button which is located right side of the dialogue box.
5. Here, now it opens one more dialogue box naming Target Frame. Select the New Window option from common tragets list and click OK.

Friday, October 3, 2008

Getting google search box on your sharepoint site

Found an easy way to get the google search box on the home page of my site
http://www.heathersolomon.com/blog/archive/2005/07/18/1023.aspx

I followed the directions but made a few slip ups, my path is different (I'm using WSS not MOSS i guess). This is how I got it working for me :

Steps:

1. Create the directory and call it external in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
2. Create a text file called google.html in this external directory and put the following code in it

The following code was placed in blogger by this great utility
http://francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html




<center>
<FORM method=GET action="http://www.google.com/search"
target="_blank">
<A HREF="http://www.google.com/" target="_blank">
<IMG SRC="http://www.google.com/logos/Logo_25wht.gif" border="0"
align="middle"></A><br>
<INPUT TYPE=text name=q size=17 maxlength=225 value=""><br>
<INPUT type=submit name=btnG VALUE="Search" style="font-
size:5px font-family:Verdana"><br>

<select name="sitesearch" style="font-
size:5px font-family:Verdana" >
<option value=""></option>
<option value="www.test.com">test</option>
</select>
</FORM>
</center>



3. On your home page drop in a Page Viewer web part and set it to point at a web page and
put the link as /sites/Portal/_layouts/external.html or whatever your equivalent is.
I intially put in my full path htt://servername/sites/portal/_layouts/external.html and it changed it to a relative path itself which is much preferable.

4. To alter the size of the google box mess around with the google.html file input box size and the height and width of the web part itself , ideally we do not want scroll bars either side. Also set it so there is no title on the web part.

Customising the look and feel....this site



has a good overview for changing look and feel of the google box

Thursday, October 2, 2008

Random Thumbnails from picture library for intranet front page

MOSS comes with "This week in pictures", WSS alas does not.

I came across this free bit of code for implementing random or sorted thumbnails for my WSS 3.0 intranets front page.

http://www.codeproject.com/KB/sharepoint/WssPictureThumbnails.aspx

Download the web part http://www.codeproject.com/KB/sharepoint/WssPictureThumbnails/WssPictureThumbnails.zip

unzip it

stsadm -o addsolution -filename QuesttechSolution.wsp

Go SharePoint Central Administration/Operations/Global Configuration-Solution Management and deploy the solution to selected web applications. In the site collection where the solution is deployed, activate the Site Collection feature "Questech Systems Web Parts". After that, the Picture Thumbnails web part (listed under Questech Systems) should be available for you to add to pages.


To get it working I needed to add the three javascripts in the package in my front page , litebox-1.0.js, moo.fx.js and prototype.js (put them in seperate tages and put the contents of the two css files in with header of the masterpage for the site(looking at the article and my experience just putting the contents in core.css did not work? , think they should be put in a custom.css file later)

*** IMPORTANT: Make sure blank.gif, closelabel.gif, loading.gif, nextlabel.gif, prevlabel.gif are copied to /images for the website


***IMPORTANT, PUT CSS CLASS TO PT IN THE CSS CLASS BOX IN THE WEB PART ***


***Important: to get the thumbnails bigger look at what you are using in the picture library, e.g by default thumbnails are 160 w 160 h, if use change the CSS for PT from 80w 80 h there will be none of the thumbnail clipped off! Of course if u change value of thumbnails coming in then need to change below to match!

.PT li a{ width:160px; height:160px; border:solid 1px #fff; display:block; text-indent:-5000px; font:0/0 Arial;}

Monday, September 29, 2008

Sharepoint Designer 'Error reading file' on opening default.apsx file

Opened default.aspx to edit it and got 'error reading file', could only open in text mode or notepad.
Did some reseach on google and found this ..

http://msdevelopers.blogspot.com/2007/04/error-reading-file-with-sharepoint.html.

I look in the file and was a massive blank area between the two sections of code, 70,000 lines.
Solution I found was to cut the bottom bit of code and paste so all the code is together, just highlight and cut the combined code and past it into a newly created aspx file. Rename old file and name new file default.apsx.

Also did this
BACKUP LOG SharePoint_Config WITH TRUNCATE_ONLY
USE SharePoint_ConfigGODBCC SHRINKFILE (SharePoint_Config_Log, EMPTYFILE)GO

afterwards as might have been contributing to the problem.

Thursday, September 18, 2008

Customising the Announcments Web

A pain with the standard announcments web part is that you cannot just click on the title and go straight to the attachement or web page that you need.

Solution

Create a new column called 'Link' , make this a hyperlink
This has two columns to edit for each item , the address itself either http: , ftp etc and the text description. You can leave the text description blank.
If you are using an attachement , upload it then in edit view right click the mouse and copy shortcut and paste the path in the hyperlink column for Link.
If you are linking to an internal or external web page just paste the link.

Amend the title field
Click on the title field in the announcments web part, edit hyperlink and replace in the address
mailto:%7BURL_Display?ID={@ID} with this {substring-before(@WebPageLink, ', ')} - leave the text description of the hyperlink as @Title.

You will now find you can click on title and it will take you straight to eithe the attachement or web page AND you can still click down and view or edit item !

*** Note you cannot store a relative URL in a list item column , has to be fully qualified **** a pain if you move servers since you will need to edit all the links in the announcments list ****

Friday, September 5, 2008

WSS Alter thumbnail size in picture gallery with Sharepoint Manager 2007 and Change background Color of thumbnail and border

The default size for thumbnails picture libraries is contained in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PictureLibrary\PicLib\schema.xlm.

Find ThumbnailSize="160" WebImageWidth="480" WebImageHeight="640
and change it here. This will be used for any NEW picture library you have created.

For an exisiting picture library you have already created download Sharepoint 2007 Manager, a good tool for looking at the inards of Sharepoint WSS or MOSS 2007.

Open it up aqnd go to your site collection, lists and find say Marketing Picture Library (or whatever you called your library). There is a thumbnail property of 120 , I set it to 80.
You can change WebImageHeight and WebImageWidth for resizing the WebPreview if you want.

Go file Save Change to Sharepoint

Refresh your picture library and it is now resized!

Change Background Color of the thumbnail
The dark grey is a bit too much , you can change it via CSS (a whole other story)
*** Note CSS for the site should have its own custom css file as upgrades can wreck changes ****
There are two items that need tweaking:

img.thumbnail
Color behind thumbnail in the Picture Preview area of the left navigation area in a picture library.
.
.ms-imglibthumbnail
Background for thumbnails in Thumbnails view. Border color should be the same as for img.thumbnail style above. Ensure has border that is solid, 1px and #E7E3E7

Edit these in core.css in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\STYLES

img.thumbnail{border:solid #E7E3E7 3px;}tr.ms-imglibselectedrow,tr.ms-highlight{background-color:#f2f2f2;}
.ms-imglibthumbnail{background-color:#F7F7F7;border:solid #E7E3E7 1px;}

Thursday, August 28, 2008

Indexing pdf documents with Adobe v8.0 reader and Search Server Express 2008

Search Server Express 2008 does not index pdf files out of the box. You need an ifilter for pdf which is installed automatically when you install the Adobe acrobat reader v8.0. (Note this will only index pdf created in adobe 8.0 and under)

Steps to get pdf working with SSE 2008:

1. On your server download and install Adobe Acrobat reader v8.0
2. Go to WSS admin and the SSE 2008 shared services admin page. Under 'File Types' add the pdf extension here
3.
Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Search\Applications\{ANYGUID}\Gather\Search\Extensions\ExtensionList
Find the highest number in the list(should be 38) an enter pdf for the value data.


Modify the registry keys by changing their 'Default' value to the new CLSID of Adobe Reader V8.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf\Default - set to {E8978DA6-047F-4E3D-9C78-CDBE46041603}

*** Note if your version of Abobe 8 is say 8.x will need a different CLSID to put in ***

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Shared Tools\Web Server Extensions\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf\Default - set to {E8978DA6-047F-4E3D-9C78-CDBE46041603}

4. Add the installation directory of Adobe Reader v8.0 to the path under 'Environment Variables' in the system part of Windows Server control panel
"c:\Program Files\Adobe\Reader 8.0\Reader" - this is important as it tells SSE 2008 where to find the right DLLs

5. Stop and restart the search service

net stop osearch
net start osearch

test it by running , you should see PDFs and first couple of lines of content from each(if you dont them something is not set right, you should be able to see within them the content).

Reboot server if still not seeing it.

NOTE: you will need to completely recrawl all your content source first! Would do a reset of of the index to clear SSE out and recrawl everything from scratch.

Tuesday, August 19, 2008

.NET 3.5 Service Pack 1 fails on Install

Tried to install .NET 3.5 Service pack one of my dev box, fell over with no apparent reason leaving reporting services and sharepoint not working with IIS.


Note that 3.5 sp 1 has fallen over with no obvious error on at dev and production when first installing it.It seems .NET 2.0 was corrupted somehow or had a component missing ,just trying to repair it did nothing. The patch stopped reporting services , sharepoint and web sites from working. Error message got on reporting services:

ASP.NET runtime error: Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Solution: uninstall every .net runtime from 3.5 to 2.0 in that order including service packs and reinstall. Before install 3.5 sp 1 copy system.enterpriseservices.dll from c:\windows\microsoft.net./framework/2.xxxx to c:\windows\assembly(ie the Global Assembly Cache - GAC). Also ensure distributed transaction coordinator is working MSDTC in services, this can cause .NET 3.5 install to fall over.Install 3.5 sp 1 but download the FULL installation, not the bootstrap version. Apply .net 2.0 to all the IIS web sites – go to c:\windows\microsoft.net./framework/2.xxxx and type aspnet_regiis –I. Restart iis , type .iisreset. Note that may need Ajax 1.0 installed, not used but web.config of at least one website may reference it e.g. expenses.

Thursday, August 7, 2008

Getting Search Server Express to play with WSS 3.0

Install Search Server Express 2008 and integrate it with WSS (fairly straight foward)

Go to your main site collection where you want search e.g. http://servername :41167/sites/Portal/
Go Site Actions Site Settings and select Sites and Workplaces(this is where you create subsites)
Click Create,

Set title to SearchCenter(or whatever)

Add the name of your subsite to the url name e.g SearchCenter

Select Enterprise Search Center as the site template to use

Click create



To enable search center web partsa (so you can place search boxes on your site collections web pages rather than just having to go the the search center subsite) do this...



Go to your main site collection e.g. http://servername:41167/sites/Portal/

Go Site Actions Site Settings Site Collection Administration Site Collection Features
Click on Activate button for Office Sharepoint Server Search Web parts (this is in fact Search Server Express 2008 web parts)

Check this works, add a web part to page on your site and you should see the list of search web parts








Modify the master page search box web part to point at target search URL of http://servername:41167/sites/Portal/SearchCenter/results.aspx (under micellenous in the web part properties). This will push key words entered to the SSE 2008 results page.

You can also drop a search box web part into your non-master page areas and set it up to go to SSE 2008 results page.

Setting up Scopes to search

Having set up your content sources on the main WSS admin page for SSE go to your specifc site e.g. http://servername:41167/sites/Portal and go to Site Actions | Site Settings

Click Seach Scopes

Click New Scope

Fill in the form checking the display groups you want it in (e.g. basic and advanced search)

choose the default search page

Cick ok

Add rules ...

Select content source from drop down box and select your source e.g. investment documents or shared

***SELECT 'REQUIRE' TO ENSURE THAT ONLY RESULTS FROM THIS CONTENT SOURCE ARE INCLUDED BY THIS RULE ****

CLICK OK


Once the scheduled complilation takes place should be able to see your scopes in the dropdown box!


Getting scopes to show on Main Search Server Express 2008 query page and Advanced Search Page

This is a bit daft, but go to the SSExpress query page on your specific web site, edit page

modify web part for the search box, first item relates to Scopes, select show scopes and they appear!!! OK it and exit

Go to Advanced SSE page , modify web part and select show scopes box. You can then edit the text for the descriptions.




Friday, July 25, 2008

Sharepoint Library Basics

Library Folders - no description or meta data as Standard

While you can add a new folder in a document library it has only one piece of meta data associated with it - name. Typcially intranet users want to see a description next to the folder.

You need to create a new website content type thats based on the content type 'Folder' and use this instead. Once created you can include it in any library.

http://www.mindbusiness.de/blog/2007/05/02/sharepoint-folders-and-metadata/

No PDF icons for files as Standard

PDF files have a blank icon associated with them, do the following making sure your PDF icon is 17*17

http://support.microsoft.com/kb/837849