Top node stops being homepage after publishing causing 404
I'm using Umbraco 6.1.1.
Also, the 'Link to document' changes from '/' to 'home.aspx'. After publishing, it is necessary to go to 'Republish entire site' to get things back to normal.
I'd really appreciate any help sorting this out quickly, as we are handing over the site to a client soon so this is obviously quite a big problem for us.
This seems to have sorted it out. It still doesn't show '/' as the 'Link to document' (or in the navigation), but using just the domain name in the browser is now going to the right page.
using Umbraco.Core;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic;
using umbraco.cms.businesslogic.web;
namespace Umbraco.Extensions.EventHandlers
{
public class RegisterEvents : ApplicationEventHandler
Top node stops being homepage after publishing causing 404
I'm using Umbraco 6.1.1.
Also, the 'Link to document' changes from '/' to 'home.aspx'. After publishing, it is necessary to go to 'Republish entire site' to get things back to normal.
I'd really appreciate any help sorting this out quickly, as we are handing over the site to a client soon so this is obviously quite a big problem for us.
Thanks in advance.
This seems to have sorted it out. It still doesn't show '/' as the 'Link to document' (or in the navigation), but using just the domain name in the browser is now going to the right page.
using Umbraco.Core;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic;
using umbraco.cms.businesslogic.web;
namespace Umbraco.Extensions.EventHandlers
{
public class RegisterEvents : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
Document.AfterPublish += Document_AfterPublish;
}
private void Document_AfterPublish(Document sender, PublishEventArgs e)
{
Log.Add(LogTypes.Debug, sender.Id, "the document " + sender.Text + " has just been published about to refresh");
umbraco.library.RefreshContent();
}
}
}
is working on a reply...