Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# eylenh 11/2/2007 11:35 PM
My main CSS is working fine. I created a separate CSS for some lightbox effects on one page and used to load the stylesheet in a static html page edited with the FCKeditor.

In version 1.5 however, the CSS load is automatically stripped out by FCKeditor (only when opening an existing piece of html of when saving in the non-source code view). This is probably correct, as strictly speaking CSS files should be loaded in the header of the html document.

So I decided to merge my two CSS files into one and point Cuyahoga for that one page to the combined CSS. The combined CSS validates perfectly and does not contain any duplicate element, yet whenever I try to load that specific page, I get an error 500 : object reference not set to an instance of an object. When I switch on logging, I get this :

2007-11-02 23:19:44,046 [6756] ERROR Cuyahoga.Web.Error [(null)] <(null)> - An unexpected error occured
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Cuyahoga.Web.UI.BaseTemplate.RenderCssLinks(String[] stylesheets)
at Cuyahoga.Web.UI.PageEngine.InsertStylesheets()
at Cuyahoga.Web.UI.PageEngine.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8794b77c\95bd9f8\App_Web_wiu1brpn.0.cs:line 0
at Cuyahoga.Web.HttpHandlers.PageHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Before I dive into the code, is there anyone who has experienced similar behaviour and perhaps fixed it?

Cheers

Hans
# martijnb 11/3/2007 12:22 PM
Maybe you're missing something in your template user control?

It has to inherit from BaseTemplate (Inherits="Cuyahoga.Web.UI.BaseTemplate" in the declaration at the top) and an asp:literal control for the stylesheets should be in the head (with id="Stylesheets" ).
# eylenh 11/3/2007 7:19 PM
Hi Martijn,

thanks for pointing that out. Somehow a user control from version 0.9 had slipped back into my 1.5 setup. Once I replaced it with a correct 1.5 version, the error disappeared. Now I just have to adapt it to correctly show my lightbox elements.

Thanks

Hans