You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Website 2 - which exists in 'nl' & 'fr' - domain is not mapped to a language, browserlanguage is used to determine the language when visiting the homepage of the domain, any other page has the language in the url.
When using the domain of website 2 and trying to configure the search engine sitemap settings we receive a 404. When using the domain of website 1 everything works fine.
This all is due to the AdminManageSiteMap inheriting from the SimplePage class, which inherits from the PageBase. I do not know why this is the case, as the settings page is not a real episerver page.
In the OnInit(EventArgs e) method of the PageBase cache policies are being set in this.SetCachePolicy();
The method does the following:
protected virtual void SetCachePolicy() => this.Locate.Advanced.GetInstance<OutputCacheHandler>().SetCachePolicy(PrincipalInfo.CurrentPrincipal, (ContentReference) this.CurrentPageLink, (HttpContextBase) new HttpContextWrapper(this.Context), Settings.Instance, this.CurrentPage != null ? this.CurrentPage.StopPublish : new DateTime?(DateTime.MaxValue));
Here the issue is the CurrentPage is being called, this is resolved by the LoadCurrentPage class which does the following:
public virtual PageData CurrentPage
{
get
{
if (this._pageData == null && PageReference.IsValue(this.Page.CurrentPageLink))
{
LoaderOptions loaderOptions = new LoaderOptions();
loaderOptions.Add<LanguageLoaderOption>(this.EnableMasterLanguageFallback ? LanguageLoaderOption.FallbackWithMaster() : LanguageLoaderOption.Fallback());
this._pageData = this.Page.GetPage(this.Page.CurrentPageLink, loaderOptions);
if (this._pageData == null || !this.EnableLoadPageWithoutTemplate && !ServiceLocator.Current.GetInstance<TemplateResolver>().HasPageTemplate(this._pageData) || !this.IsRoutable(this._pageData))
{
this.Page.Response.Clear();
ExceptionManager.RenderHttpRuntimeError((Exception) new HttpException(404, "Not Found"));
this.Page.Response.End();
}
}
return this._pageData;
}
set => this._pageData = value;
}
It tries to retrieve the CurrentPageLink without MasterLanguageFallback, the CurrentPageLink points to the HomePage of the site since AdminManageSiteMap is not a real EpiServer page. Which in our case fails since as mentioned at the beginning browserlanguage is used since no language is included in the path, which in our case is 'en'. The site does not exist in 'en' and so a 404 is returned. This all happens without any error logging so is quite a mystery when we encoutered this at first.
This is related to the issue which was encoutered in #32, except there it was with this.ValidatePageTemplate() which is called later in the OnInit(EventArgs e) method.
The text was updated successfully, but these errors were encountered:
Our setup is as follows:
.Net Framework 4.7.2
Episerver.CMS 11.20.5
Episerver.Commerce 13.30
Geta.SEO.Sitemaps 4.0.0
Geta.SEO.Sitemaps.Commerce 4.0.0
When using the domain of website 2 and trying to configure the search engine sitemap settings we receive a 404. When using the domain of website 1 everything works fine.
This all is due to the
AdminManageSiteMap
inheriting from theSimplePage
class, which inherits from thePageBase
. I do not know why this is the case, as the settings page is not a real episerver page.In the
OnInit(EventArgs e)
method of the PageBase cache policies are being set inthis.SetCachePolicy();
The method does the following:
protected virtual void SetCachePolicy() => this.Locate.Advanced.GetInstance<OutputCacheHandler>().SetCachePolicy(PrincipalInfo.CurrentPrincipal, (ContentReference) this.CurrentPageLink, (HttpContextBase) new HttpContextWrapper(this.Context), Settings.Instance, this.CurrentPage != null ? this.CurrentPage.StopPublish : new DateTime?(DateTime.MaxValue));
Here the issue is the CurrentPage is being called, this is resolved by the
LoadCurrentPage
class which does the following:It tries to retrieve the
CurrentPageLink
without MasterLanguageFallback, theCurrentPageLink
points to the HomePage of the site sinceAdminManageSiteMap
is not a real EpiServer page. Which in our case fails since as mentioned at the beginning browserlanguage is used since no language is included in the path, which in our case is 'en'. The site does not exist in 'en' and so a 404 is returned. This all happens without any error logging so is quite a mystery when we encoutered this at first.This is related to the issue which was encoutered in #32, except there it was with
this.ValidatePageTemplate()
which is called later in theOnInit(EventArgs e)
method.The text was updated successfully, but these errors were encountered: