2007
Articles about or related to Windows SharePoint Server (WSS) 3.0 or Microsoft Office SharePoint Server (MOSS) 2007.
2010-01-25 10:35
Bug in variations - Add/remove web part in source
Me and my team have identified some bugs in variations during the years. Last week we identified a new bug that we were surprised that we haven’t found before. Maybe it was introduced in one of the latest cumulative updates?
I was able to reproduce the bug below in a MOSS stand-alone-farm with SP2 and October CU (2009) and Swedish language pack (WSS + MOSS).
Setup: OOB (Out-of-the-box) Publishing Portal (with no workflow), created a source and two labels.
Scenario:
1. You edit a page in source and add a web part and publish the page. You wait for the page propagation job to finish and verify that the web part has been replicated to your label pages.
2. You delete the web part from the source page and publish the page. You wait for the page propagation job to finish and verify that the job isn't able to remove the web part from the label pages.
3. You can add a new web part to the source page and publish the page. Then when the page propagation job runs it removes the web part added in step 1 above and "replace" it with the web part added in step 2 above..
I have reported this bug to MS Support, it shouldn't take long for them to repro the issue. As always, MS Support loves you if you are able to repro the issue in an OOB site. This causes less effort for them to identify the bug. Otherwise they can require you to send over your WSPs' and in the worst case even the whole content database.
I will update this post with the status of the bug.
Cheers,
Carl Johan Bergkvist
Postad av Sharepoint
Kommentarer (0)
Kategorier:
2007
2010-01-21 17:31
Enhance the searchability of your portal
Isn’t it lovely the way SharePoint brings all your content together and makes it possible to collaborate across any boarders? Though, it’s a lot of planning that needs to be done. I have been working on a various numbers of SharePoint projects during the history of WSS and MOSS; public portals, extranets, intranets, collaboration portals etc. The funniest part is when you bring all the pieces together. One thing I had the opportunity to do during the past year. I will write a number of articles about some of my learning so far. My first post will treat the subject search and I will dig into automatic metadata.
MOSS standard search is a powerful tool but it requires a lot of understanding and configuration to make it work properly. During the past years more powerful search engines has been introduced in SharePoint (like Fast). But the thing is that it’s very common that the MOSS Standard search isn’t configured in a right manner and therefore being excluded in advance for more expensive search engines.
So what should you do to enhance the searchability? It whole starts already in the beginning of you project. Most often search is the last thing people think of and most often they haven’t even calculated any time for this activity in their project plan.
“The search should just work out of the box”.
The users find metadata tagging boring so they chooses not to apply it and if you are requiring metadata to be entered the users often chooses the wrong data making it unusable. In my last project we started to experiment with automatic metadata tagging. We developed a custom field type which purpose is to look in the site structure were the page is being created or where a curtain document is being added. The custom field is included in you page content type (or your specific document content type) but you are not displaying the field for the page editor (in the example below the field will be displayed if the user has a very wide monitor :):
<PublishingWebControls:EditModePanel runat="server" ID="editmodepanel1">
<div style="position:absolute; right:2000px">
<SharePointWebControls:FormField runat="server" FieldName="ProdCategory" ID="Productmetadata" ></SharePointWebControls:FormField>
<SharePointWebControls:FormField runat="server" FieldName="ProdBrand" ID="FormField1" ></SharePointWebControls:FormField>
<SharePointWebControls:FormField runat="server" FieldName="ProdName" ID="FormField2" ></SharePointWebControls:FormField>
</div>
</PublishingWebControls:EditModePanel>
(If you have a public portal you can in advance render these fields in display mode as <META name=”keywords” content=”ProdCategory, ProdBrand, ProdName”> this will make your page more popular for external search engines)
This idea is based on that your site structure is in a hierarchy. So before you go on and implement this idea it’s important that your editors are familiar with the taxonomy of your portal. For example you are developing a product site for a company that is selling winter equipment. On the top of their site they have products. Navigating down in products will show skies, snowboards, clothes, accessories… Navigating down on snowboards will show burton, salomon… This means when you are visiting the page “Dominant Snowboard” your url will look something like this:
“../products/snowboards/burton/dominant/pages/default.aspx”
Or
“..products/prodcategory/prodbrand/prodname/pages/default.aspx”
What automatic metadata does here is what you have configured the custom field to trigger. You enter some trigger words in your custom field that the field should match on in the url (these trigger words you render in a dropdownlist or similar in your search page..). One important thing is that we don’t allow none html friendly characters in the url because this would force us to develop translators.. In this example the automatic metadata will be set to ProdCategory: Snowboards, ProdBrand: Burton and ProdName: Dominant.


Often the user knows what she wants when she is visiting a product site. But for the users who don’t know what they are looking for I really recommend you to introduce faceted search in your portal (http://facetedsearch.codeplex.com) and configure this webpart to suggest pages containing your trigger words. For example if the user searchs for snowboards, the faceted search webpart will render all pages with the metadata snowboards. These kinds of webparts are often used to make the end users buy more things. “People who bought this product also bought...”, then they are just using the faceted search to trigger on Accessories for example.
I assume that you are familiar how to setup metadata properties in Shared Services and map them to your automatic metadata field and how to develop custom fields. If you are not google will help you out
.
This is just one of many things you can do to enhance your search capability, but it’s a low effort compare to the improvment made.
If this subject interests you I’ll be glad to discuss it further more and share code.
Cheers,
Carl Johan
Postad av Sharepoint
Kommentarer (0)
Kategorier:
2007
2010-01-14 16:48
SPFieldTargetToControl
If you want to use a audience picker field on a pagelayout you can use the example below in your aspx.
...
<%@ Register tagprefix="FieldTypes" namespace="Microsoft.Office.Server.WebControls.FieldTypes" assembly="Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
..
<asp:Content contentplaceholderid="PlaceHolderMain" runat="server">
...
<PublishingWebControls:editmodepanel runat="server" id="editmodepanel">
...
<FieldTypes:SPFieldTargetToControl runat="server" FieldName="Audience" AudienceTypes="GlobalAudience" />
...
</PublishingWebControls:editmodepanel>
...
</asp:content>
Good luck !
// Niklas
Postad av Sharepoint
Kommentarer (1)
Kategorier:
2007
2010-01-14 16:04
Wait for a Timer Job to complete
Sometimes is is necessary to wait for a specific Timer Job to complete before letting your code continue execute.
Could for example be some WebConfigModifications you want to make sure has been applied on all servers in the farm.
...
app.Farm.Services.GetValue().ApplyWebConfigModifications();
app.Update();
AvegaHelpers.WaitForJobToComplete(app, "job-webconfig-modification", 300, true);This could easily be done with the following helper method...
Postad av Sharepoint
Kommentarer (0)
Kategorier:
2007