Problem with EWE

Topics: Enhanced Wiki Edition
Jul 18, 2007 at 8:39 PM
I installed EWE on my MOSS server. First thing I noticed was a couple doc issues - the wsp filename doesn't match the doc, and more importantly, there are features at the site collection and site levels which need to be activated.

Still, I'm not getting the new buttons in either the Wiki pages or Discussion list; alas this renders the solution kind of useless. Any suggestions in how to make it work?

Thanks!
Jul 23, 2007 at 10:04 PM
Edited Aug 15, 2007 at 11:11 PM
I ran into these same problems. Needing to activate the site collection and site features isn't a big deal. You just have to remember to activate them when you create a new site. More troubling to me is site-collection scope to begin with. If you want to activate this feature, it will apply globally and all Wiki sites will try to have discussion board.

Yes, the package is different from what is downloaded. This is simply because the doc is out of date. You can rename the .wsp to match the doc if you like; no harm.

The missing controls are caused by the control templates referring to an outdated version of the assembly. This is actually fairly simple to remedy (but it did take quite some time to find!)
After you've installed the wsp from the command line:

Open the Sharepoint folder (something like: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12)
Go into TEMPLATE\CONTROLTEMPLATES

Using Notepad (or similar), edit WikiTopicViewTemplate.ascx and WikiDiscussionViewTemplate.ascx
Near the top, around 4th or so line down in these files, you will see a Register TagPrefix="Custom" - modify that entire line to match the below:
<%@Register TagPrefix="Custom" Assembly="CKS.EWE.WikiDiscussion.Controls, Version=1.8.4.0, Culture=neutral, PublicKeyToken=3fc190ba2297c646" namespace="CKS.EWE.WikiDiscussion"%>

While you're in those files, you can make changes to the label which is displayed as well.

Save those and give an iisreset.

When you go back into your site, go to the site collection and make sure the feature is enabled. Then go to the site where you want to have this running and view all site content.
Click create.
You should see a new option for Wiki Discussion Board (this is different from the normal Discussion Board you see). You need to create this in addition to the Wiki Pages you should already have. I can't remember if you MUST name it Wiki Discussions but I've been running with that just fine. (So you should now have both "Wiki Pages" and "Wiki Discussions" in your site.) Oh, remember to activate the event handlers feature in your site so deletes and renames to the wiki will be reflected in the associated board.

You should be up and running now! I'm going from memory and I'm obviously not affiliated so your mileage may vary!

Hope this helps,
-Erik
Aug 15, 2007 at 6:28 PM
Edited Aug 15, 2007 at 6:39 PM
I've added and deployed the solution to our farm and made the edits to the two templates (mentioned in the post, above) and still do not see any evidence that the solution has successfully deployed to our environment. All 4 templates ARE in the CONTROLTEMPLATES folder. When attempting to activate the site feature, it is not found anywhere. This, of course, makes creating a "Wiki Discussion Board" impossible.

Is there any other way I can troubleshoot this deployment?

Any help would be greatly appreciated.

Mike
Aug 15, 2007 at 9:10 PM
You don't see either of the features to be activated? Unless you've recompiled the project to change the scopes like I did you should see the following. Do you have either one of them or do neither show up?

In the Site Features there should be Wiki Discussion Event Handlers
Event handlers to coordinate delete & rename actions from Wiki Topic pages to Wiki Discussions (v1.8.4.0).

In the Site Collection Features there should be Wiki Discussion Lists
Provides support for discussion boards for a Wiki site (v1.8.4.0).



The other thing you can do is look in your GAC (c:\windows\assembly) for the CKS.EWE.WikiDiscussion assembly and verify that it is Version 1.8.4.0 and has a public key token of 3fc190ba2297c646.

If the assembly isn't there, then the deployment failed (did you remember the -allowgacdeployment option when you deployed the package?). If the version and public key don't match (shouldn't happen unless you recompiled it yourself and changed some things) then change the templates to reflect the correct information (check for typos while you are at it anyway.)

If everything looks fine here, you can check the log file SharePoint creates to see if there are any clues there. The only other place I can think there would be a problem is if the manifest files didn't have the correct version of the assembly but they were correct in the download I had and did not need to change these.

The log file for SharePoint should be somewhere like:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS\

If you find the solution, please post in case anyone else has similar troubles.

-Erik
Aug 15, 2007 at 10:32 PM
Edited Aug 15, 2007 at 10:42 PM
Thanks for your reply, Erik.

Yes, I do see the Wiki Discussion Event Handlers (they are activated), however, the Wiki Discussion Lists feature is not available.

Both the .Controls and .Events ARE in the GAC and correct version and token.

I'll check the logs. Thanks. (edit - nothing useful in the logs)

Mike
Aug 15, 2007 at 11:00 PM
That is very strange.

I want to be sure you have checked the correct place for the feature though. You are sure that you are checking in Site Collection Features and not Farm Features? And you still do not see it?

I have not encountered this previously - the feature was always there and could be activated but would appear not to work until the control templates were updated to point to the correct assembly.

Also, did you remember to do an iisreset after you updated the control templates? I know this shouldn't affect whether the feature shows up but the cached controls won't display until there is a restart of IIS. Also, barring any input from the team, the only remaining option is the standard fare - remove, redeploy and restart. If it still doesn't work...well...it's an Alpha! Still, I'm surprised that the piece appears to be missing at all.

-Erik
Aug 15, 2007 at 11:21 PM
Well, your post has been very helpful... I was not looking in the SITE COLLECTION features when trying to activate the Wiki Discussion Lists. Once I did this, I did find that the Wiki Discussion Board must be created directly under the Wiki site in order for the "Discuss" link to be available.

I think I have it all working now. Thanks again.

Mike
Aug 16, 2007 at 4:27 PM
Glad you got it to work!

-Erik
Oct 3, 2007 at 6:51 PM

psychles wrote:
Well, your post has been very helpful... I was not looking in the SITE COLLECTION features when trying to activate the Wiki Discussion Lists. Once I did this, I did find that the Wiki Discussion Board must be created directly under the Wiki site in order for the "Discuss" link to be available.

I think I have it all working now. Thanks again.

Mike


Hello Mike,

I have deployed WikiDiscussionSolution.wsp to my MOSS 2007 server. Everything seems to be working fine but for some reasons I don't see "Discuss" button(link) on Wiki home page. I have made all changes to control templates suggested by Erik in this post and after that I was able to see "Wiki Discussion Board" on create page however "Discuss" link is still not showing up.

Could you please suggest me how to make that working? I would really appreciate your help. Thanks
Oct 4, 2007 at 8:54 PM
Do you see the '*' in place of the discuss link or is there nothing there at all?

After making the changes, had you performed an iisreset to get the new control templates loaded?
Oct 4, 2007 at 10:00 PM

ErikNoren wrote:
Do you see the '*' in place of the discuss link or is there nothing there at all?

After making the changes, had you performed an iisreset to get the new control templates loaded?


Yes, Erik I do see "*".

If I don't have Wiki Discussions list created, It displays "*" and if I put mouse over it, It says "Discussion board Wiki Discussions configured for this wiki site was not found"

If I create Wiki Discussions list, It still displays "*" but this time on mouse over it says "Invalid file name The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file"

I followed above steps with IIS reset each time.

I noticed that two of the control templates which you have suggested modifications are named - WikiDiscussionViewTemplate.ascx and WikiTopicViewTemplate.ascx however in all documents which came with this feature they being referred as WikiDiscussionTemplate.ascx and WikiTopicTemplate.ascx

I am sure it has nothing to do with the name of these files but I even tried by renaming them as WikiDiscussionTemplate.ascx and WikiTopicTemplate.ascx just for testing purpose but that didn't help. So I renamed them back to WikiDiscussionViewTemplate.ascx and WikiTopicViewTemplate.ascx because I trust your suggestions more than the documents came with this feature :-)

One more thing I tried to remove and redeploy this feature twice but every time I get stuck at the same point.

I followed this steps to retract and delete solution.

1. Remove Wiki Discussions list.
2. Deactivate feature from site collection.
3. Deactivate Event handlers from site features.
4. Remove assembly (total 3 assemblies starts with CKS) from C:\Windows\assembly (GAC deployment)
5. Ensure control templates have been removed.
6. Run those stsadm commands to retract and delete solution.
7. Reset IIS.

To install it back, I have followed these steps,

1. Add and deploy solutions using stsadm commands,
2. Make changes to control templates suggested by you.
3. Enable feature from site collection features in Wiki site.
4. Enable Event handlers feature from site features.
>>>>>>>>> At this point it shows "*" with "Discussion board Wiki Discussions configured for this wiki site was not found" tool tip because Wiki Discussions list is not created yet.
5. Create Wiki Discussions (plural, you have to make Wiki Discussions, i tried even with Wiki Discussion in one attempt but it failed) list by selecting Wiki Discussion Board.
>>>>>>>>>> Now it displays "*" with other tool tip - "Invalid file name The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file"
6. Reset IIS.
>>>>>>>>>> it still displays "*" with other tool tip - "Invalid file name The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file"

Please let me know if you have any idea what could be causing this issue? I really appreciate your time and help. Thanks
Oct 4, 2007 at 10:18 PM
I haven't gotten the permission denied button previously.

Your steps appear correct. Do you encounter this same error if you create a new site and create both the Wiki Pages and Wiki Discussions lists inside those?

Is there anything in the SharePoint log that might offer more information? Look for anything with the "CKS" or "discussion" string.
Oct 5, 2007 at 4:39 PM
Edited Oct 5, 2007 at 4:41 PM

ErikNoren wrote:
I haven't gotten the permission denied button previously.

Your steps appear correct. Do you encounter this same error if you create a new site and create both the Wiki Pages and Wiki Discussions lists inside those?

Is there anything in the SharePoint log that might offer more information? Look for anything with the "CKS" or "discussion" string.



Hello Erik,

I tried creating new Wiki site but still no luck. Checked SharePoint logs but there are no log entries created for the time I created a new web application - Wiki site and activated Wiki Discussion feature/event handlers for it. There are not logs containing the word "CKS". In other words there are no errors for Wiki site or Wiki Discussion feature.

I went to "Wiki Discussions" list => "Discussion Board settings => "Permissions for this Discussion Board" and checked permissions. It all looks good. Even I added one more account to site collection owner and administrators which is administrator account of the system itself (this is one box installation with database engine) but still the same error. I am going to reinstall this feature one more time and see if that helps.

I guess there might be some access issues to SharePoint resources (files and folders). Let's see, If I can fix it!!! Please let me know if you have any other ideas to troubleshoot it further.

I truly appreciate your help on this entire blog. They are awesome!!! Thanks

-Brij
Oct 5, 2007 at 8:19 PM


brij wrote:

Hello Mike,

I have deployed WikiDiscussionSolution.wsp to my MOSS 2007 server. Everything seems to be working fine but for some reasons I don't see "Discuss" button(link) on Wiki home page. I have made all changes to control templates suggested by Erik in this post and after that I was able to see "Wiki Discussion Board" on create page however "Discuss" link is still not showing up.

Could you please suggest me how to make that working? I would really appreciate your help. Thanks



Hi Brij:

Once I activated the feature at the SITE COLLECTION level, I was able to create a Wiki site with the "discuss" button available. Did you activate the feature for your entire site collection?

Mike
Oct 5, 2007 at 8:42 PM

psychles wrote:


brij wrote:

Hello Mike,

I have deployed WikiDiscussionSolution.wsp to my MOSS 2007 server. Everything seems to be working fine but for some reasons I don't see "Discuss" button(link) on Wiki home page. I have made all changes to control templates suggested by Erik in this post and after that I was able to see "Wiki Discussion Board" on create page however "Discuss" link is still not showing up.

Could you please suggest me how to make that working? I would really appreciate your help. Thanks



Hi Brij:

Once I activated the feature at the SITE COLLECTION level, I was able to create a Wiki site with the "discuss" button available. Did you activate the feature for your entire site collection?

Mike


Hello Mike,

Yes, I have activated from Wiki Site =>Site Collection and Wiki Site => Site Features. I also tried to activate it from site collection level as well but that didn't help me. Did you get this kind of error message on tool tip before?

I would really appreciate your suggestions. Thanks.

-Brij
Oct 10, 2007 at 8:22 PM
Sorry for the slow reply but this is the first opportunity I've had to crack open the code to see where the error is being generated.
This error is thrown from the WikiDiscussionControls project in the WikiDiscussionItemButton.cs file. This file specifies how the button will look on the Wiki page. This is also the location that will go and create a discussion board if one doesn't exist for the current wiki and sets GUID values for the wiki and discussion items to link them.

In the render function, we're calling a utility function to get the GUID of the Discussion Board associated with the current Wiki Page within the site that contains the current Wiki Page. (Clear?) Basically it's saying - in this site from which I'm viewing this Wiki Page, give them the discussion board ID from SharePoint of the default name "Wiki Discussions".

The default name is stored a bit further up in the same source file:
Bindable(true)
DefaultValue("Wiki Discussions")
Localizable(true)
public string DiscussionLibraryName
{
get
{
if (_discussionLib == null) _discussionLib = "Wiki Discussions";
return _discussionLib;
}
set
{
_discussionLib = value;
}
}


Please check to be sure you're using this name for your Wiki Discussion Board list type.


The util code is doing a simple lookup using this name above:

return Web.ListsListName.ID;

(Where Web is the current site context of the Wiki page (current web) and ListName is the string "Wiki Discussions".)

The problem seems to be that this is throwing an exception which the code catches and instead returns Guid.Empty; In the button control's source, it checks to see if the Guid is empty and if so, throw the error you are seeing.



From this we're back at the first round of questions:

1. In your site you have Wiki Pages and Wiki Discussions of the proper types?
2. Do these lists have the customary access rights?
3. Are you running a non-English localized version of SharePoint?
4. Can you create a discussion board item in Wiki Discussions through SharePoint manually? Can you see this new item and the content in it?
5. Can you create a discussion board item in Wiki Discussions of the same name as the wiki page? Does the "*" at the top of the Wiki or Discussion page disappear and get replaced with the default labels? (Discuss and Topic, I believe. I changed mine so I'm having trouble remembering.)

If the types are correct, when you add a discussion board item in Wiki Discussions through the SharePoint interface, you should see a "*" at the top of the page when you go to view it. This will confirm that you're using the right template type and that there is sufficient access to create a new item.

If the top is true and you confirm the types are correct, try creating a discussion board item with the same title as a wiki item you've created. If the "*" is still displaying on the Wiki Discussions page, please paste the error message. If it changes to a link and you can follow it back to your wiki then we know the types and access permissions are appropriate for you the user. The problem would then be in the ability for the button control to get the list ID (we're not even trying to create a new discussion page at the stage you reach your error - that comes a dozen code lines later.)


Try the steps above and let me know the results. I'll try to help you from there.
Oct 16, 2007 at 10:18 PM
Hi there,
be aware to change the name of the Wiki library to "Wiki Pages"! This took me quite some time to figure out...

Skip the customization part of the install.docx, these changes are defined in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\WikiDiscussionControls\WikiDiscussionList\schema.xml

I don't know if it's relevant but I changed the following in the schema.xml:
a space in: Title="Wiki Discussions" and a space in: Url="Lists/Wiki Discussions"
IISRESET
and everthing is working!

Cheers,
Amancio