Wednesday, June 3, 2009

‘g_InstanceID’ is undefined' error in meeting workspace site

. Wednesday, June 3, 2009

In a meeting workspace site, clicking on the dates mentioned in the left panel gives a JavaScript error: -

Error: ‘g_InstanceID’ is undefined.

LEVEL: Advanced

The g_InstanceID global JavaScript variable is declared in a script registered runtime by the Microsoft.SharePoint.Meetings.PropertyBag web control. This control is used in the master page that’s used by Meeting Workspace sites called “MWSDefault.master” (located on server in 12 hive\TEMPLATE\GLOBAL\).

After changing the master page on a Meeting Workspace site, the recurring meeting workspace hyperlinks under “Select a date from the list below” do not work and throw a JavaScript error.

If you create a custom master page and use it for your Meeting Workspaces, a JavaScript error is thrown.

Steps to Reproduce:

Create a new Workspace: Site Actions-> Create Site -> Select [Meetings] Basic Meeting Workspace, click Create.

On Workspace site, add a Calendar list: Site Actions -> Create -> [Tracking] Calendar.

Add a new event to Calendar list, make recurring event, and select [x] Use a Meeting Workspace to organize attendees, agendas, documents, minutes, and other details for this event. Click OK.

Follow steps to create workspace for Calendar event. Go to workspace.

Change master page for workspace: Site Actions -> Site Settings -> [Look and Feel] Master page -> select any master page for Site Master Page and System Master Page. Click OK. Go back to workspace.

SOLUTION:

a) Open SharePoint Designer 2007.

b) Go to File | Open Site and connect to SharePoint site.

c) Expand out _catalogs -> masterpage -> open master page used on Meeting Workspace.

d) In Code View, add the following line of code under

<%@ Import Namespace="Microsoft.SharePoint" %> tag:

<%@ Register Tagprefix="Meetings" Namespace="Microsoft.SharePoint.Meetings" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Add the following line of code after opening <body …> tag:

<Meetings:PropertyBag runat="server"/>

e) Save master page, check in (if necessary), and publish major version.

Now the links under “Select a date from the list below:” do not work and throw a JavaScript error message: ‘g_InstanceID’ is undefined .

0 comments: