tom1980
  •  tom1980
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
2012-05-07T19:35:19Z
I am using the "YAF-v1.9.6.1-RTW-BIN" version. When I add <YAF:Forum> to a page it gives me an error. Object reference not set to an instance of an object. (YAF.Modules.PagePopupForumModule.InitAfterPage())

When I use the 1.9.5 version the usercontrol loads ok but the paths are not correct when I'm clicking on a link eg "profile".
They are referring to the <add key="YAF.AppRoot" value="~/yaf/" /> directory and not the the correct directory of the page the usercontrol is loaded from.

So both give me a problem. Does anyone know a solution?


Thanks !
Sponsor
tha_watcha
2012-05-08T13:36:24Z
Originally Posted by: tom1980 

I am using the "YAF-v1.9.6.1-RTW-BIN" version. When I add <YAF:Forum> to a page it gives me an error. Object reference not set to an instance of an object. (YAF.Modules.PagePopupForumModule.InitAfterPage())



This issue will be fixed in the next release, or you grab the updated Source Code an Compile YAF yourself

http://yafnet.codeplex.c...eControl/list/changesets 
UserPostedImage
agccheung
2012-06-11T10:59:14Z
Glad I found this! (post is for information really)

I hit the same problem that tom1980 did, so i got the latest version from codeplex (as suggested) and ran the included build.bat, then copied over the dlls and XMLs from the Bin folder from yafsrc/YetAnotherForum.NET to my bin, also copying the pages, controls, install folders to the subfolder 'yaf' (in my case and tom1980). I was writing to ask, what i'm doing wrong after getting errors relating to database, as i was using Sql Server as database realised that the /yaf(or name of your yaf subfolder)/install/default.aspx needed to be run again, to upgrade etc! And bingo the control now appears to be visible with a page that has a masterpage.

Great project! Keep up the great work!

FYI, Using YAF as user control within a C# page which references a VB masterpage within my asp.net website.

Thanks,

Andrew

MrKeysticks
2012-07-14T15:09:11Z
Hi,

I'd like to use your forum s/w, but I'm getting the same popup problem:

[NullReferenceException: Object reference not set to an instance of an object.]
YAF.Modules.PagePopupForumModule.InitAfterPage() +35
YAF.Modules.SimpleBaseForumModule.ForumControl_AfterForumPageLoad(Object sender, YafAfterForumPageLoad e) +10
...

Further details:
I have integrated YAF into my .NET 4 web app using YAF-v1.9.6.1-RTW-BIN.zip, using a Forum subdirectory as per tha_watcha's sample application.
So I have a Forum/Forum.aspx page containing a Forum control and using my master page as follows:

<%@ Page Title="My forum" Language="C#" MasterPageFile="~/mymasterpage.master" AutoEventWireup="true" CodeFile="forum.aspx.cs" Inherits="Forum_forum" %>

<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<YAF:Forum runat="server" ID="forum" BoardID="1" />
</asp:Content>

The error occurs immediately if I browse to Forum/forum.aspx on my site. I can load Forum/default.aspx but then the same error occurs if I click any links.

Can you tell me: Is there a binary release that contains the fix for this, or a work around? If possible, I'd prefer not to have to work out how to build your source, and which is a stable version of it.

I have successfully followed the same process with YAF-v1.9.5-RC1-BIN.zip without the error occurring, so I could always use that, but it looks like the anti-spam stuff in the later version is worth having.

Many thanks.


tha_watcha
2012-07-14T17:02:05Z
Quote:

Can you tell me: Is there a binary release that contains the fix for this, or a work around? If possible, I'd prefer not to have to work out how to build your source, and which is a stable version of it.



No sorry there is currently no newer stable build available.
UserPostedImage
MrKeysticks
2012-07-14T17:59:19Z
Thanks for your reply. That's a shame.

FYI: I've debugged this some more and discovered that the issue is caused by having an AjaxToolkit:ToolkitScriptManager on my masterpage. I guess I'll just have to do without my nice ajax rounded corners 😞
tha_watcha
2012-07-14T20:12:32Z
Originally Posted by: MrKeysticks 

Thanks for your reply. That's a shame.

FYI: I've debugged this some more and discovered that the issue is caused by having an AjaxToolkit:ToolkitScriptManager on my masterpage. I guess I'll just have to do without my nice ajax rounded corners :(



If you know how to debug, why not grab the source code compile it and run the fixed code?

UserPostedImage
MrKeysticks
2012-07-15T10:07:00Z
Good plan, thanks.
paulc
  •  paulc
  • 50.2% (Neutral)
  • YAF Forumling
2013-04-29T15:08:15Z
hi i have this same problem in my content page only. I have ajaxcontrolToolkit scriptmanager on my master page so this makes sense. please could you explain what the change is to the source code? i have already customized the source so would like to just fix the issue manually.

thanks

paul

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved