Hello!
I've faced with the same issue and it stopped us and our deployment plans(
So could you please suggest any workarounds ASAP...
I've found that the reason could be in incorrect calling of CreateContainer() method within
GlobalContainer, where all modules(pages as well) are registered during startup.
It sounds like CreateContainer() never fired in this case??
As soon as I understood the first calling of CreateContainer method should be made by
YafTaskModule->Init(all happen this way in the case of forum didnt reside inside website)
But in case forum is installed as webapplication within existing website the calling of this method is performed before
YafTaskModule->Init with unpredictable results(multithreading issue ???), f.e if registered user requests Forum/default.aspx page from website.
I included all sources of yafnet(YAF-v1.9.6.1-RTW-SRC ) to our site to debug it and in total Forum.GetPageSource() contains only 3 ILocatablePage in it : "ModerateForumPage", "ForumPageRegistered" and "AdminPage", so any other requested page could not be found(((
in our case yafnet forum recides in subdirectory within web site
website
/forum
so it can be reached like this:
www.mysite.com/forum P.S. These are only my assumptions and findings and the reason might be another one...
please suggest any workarounds
Thanks in advance, Alex Borodkin.
Upd:
I found a quick workaround:
I replaced the logic for fetching pages from container to simple setting their page names like this:
[NotNull]
private string GetPageSource()
{
var pages = this.Get<IEnumerable<ILocatablePage>>();
var pageQuery = "forum";
if (this.Get<HttpRequestBase>().QueryString.GetFirstOrDefault("g") != null)
{
pageQuery = this.Get<HttpRequestBase>().QueryString.GetFirstOrDefault("g");
this._page = pages.GetPage(pageQuery);
}
if (this._page == null)
{
this._page = pages.GetPage("forum");
}
/*if (!this.IsValidForLockedForum(this._page))
{
/ YafBuildLink.Redirect(ForumPages.topics, "f={0}", this.LockedForum);
}*/
string[] src = { "{0}pages/{1}.ascx".FormatWith(YafForumInfo.ForumServerFileRoot, this._page == null ? pageQuery : this._page.PageName) };
string controlOverride = this.Get<ITheme>().GetItem("PAGE_OVERRIDE", this._page == null ? pageQuery : this._page.PageName.ToLower(), null);
if (controlOverride.IsSet())
{
src[0] = controlOverride;
}
var replacementPaths = new List<string> { "moderate", "admin", "help" };
foreach (var path in replacementPaths.Where(path => src[0].IndexOf("/{0}_".FormatWith(path)) >= 0))
{
src[0] = src[0].Replace("/{0}_".FormatWith(path), "/{0}/".FormatWith(path));
}
return src[0];
}
From now it's possible to get correct src source but I am afraid this can cause extra issues.
Could someone from support/dev teams review this solutions?
Thanks in advance, Alex Borodkin.
Edited by user
2013-02-28T12:22:05Z
|
Reason: Not specified