Thursday, 12 July 2012

Getting the application started and loaded

OK. let's have a look at the individual customer stories in detail.

Getting the application started and loaded without any 404 Resource XYZ not found errors

Let's have a look at what happens here.

Could not load file or assembly 'System.Web.Entity' or one of its dependencies. The system cannot find the file specified.
Remove reference from umbraco.presentation and rebuild.

Unable to open configSource file '.../umbraco/presentation/config\UrlRewriting.config.
Unfortunately  mono cannot deal with the '\' paths in web.config. Set all such paths from '\' to '/'.

Parent not found with id = default.
Make sure the .NET 4 default.browser file is available and in the application path.. e.g. in ../umbraco/presentation/App_Browsers
This file is not available in mono, you will need to get it from your windows .NET 4 files.

There was attempt to redirect to '/umbraco/' which is another domain than where you've logged in.
Cross site scripting barrier kicks in. Not sure why - could be a localdomain issue.
Comment out css barrier for now, .../umbraco/presentation/umbraco/login.aspx.cs lines 137:144
Fix is deferred for now

The installer screen does not appear
In web.config set the umbracoConfigurationStatus key to ""

The installer appears but no styles / scripts are loaded.
Change ../umbraco_client/installer references to ../umbraco_client/Installer

Script resources (*.axd) not found.
In web.config change all assembly references to

Cannot remember why I did this anymore...
In .../umbraco/presentation/install/default.aspx added references to: System.Web.Configuration, System.Text, and System.Drawing

The file '/install/steps/defaultuser.ascx' does not exist.
This is the case for these install steps again it is a casing issue
In umbraco.presentation/install/steps/Definitions/*.cs set the UserControl property value casing to match referenced file name casing. I.e., /steps/defaultuser.ascx to /steps/defaultUser.ascx, and /steps/validatepermissions.ascx to /steps/validatePermissions.ascx

Starter Kits step 'No Thanks' image does not show
In umbraco.presentation/install/Skinning/locadStarterKits.aspx line 35 change installer to Installer.

Login panel appears on the left javascript and files do no load
In .../components/umbraco.controls/Panel.cs, replace references to panel/ with Panel/
OK, now we can login.

But... upon logging in you are greeted with: System.InvalidCastException
at System.Web.Script.Serialization.JavaScriptSerializer..ctor in mono/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs:67
This is a particularly tough error to sort out. The trick is to look at the Application output. System.Web.Extensions is loaded twice as .NET 4 (by the web site) and as .NET 3.5 (by the Our.Umbraco.uGoLive.dll). The latter gains precendence and causes a crash. This is a documented mono bug with workarounds.
You can choose from one of these: (1) recompile the Our.Umbraco.uGoLive.dll in .NET4 but the source is not available, (2) disable Our.Umbraco.uGoLive.dll, or (3) use an assembly redirect to redirect to We will do (3).

Whew, that was something... Now we log in and are greeted by An empty screen with a loading bar
Using Firebug, focus on the GET language.asp 500 internal server error.
The error results because language.asp cannot find the appropriate language xml file to load.
In umbraco/businesslogic/IO/IOHelper.cs change in line 99, path[1] to path[0].
This is a small but significant change and may need revisiting.

The language file now loads but the screen still looks the same
In umbraco.presentation/umbraco/umbraco.aspx, and in umbraco.presentation/umbraco/masterpages/umbracoPage.master change Application/jQuery to Application/JQuery. Do a search and replace for this pattern to correct all solution occurrences.

Now, the UI loads but the right hand side Dasboard panel gives a file not found error
In umbraco/businesslogic/IO/SystemFiles.cs change dashboard.config to Dashboard.config.
In the same file also change these:
xsltExtensions to xsltExtensions
restExtensions to restExtensions

We ll be proactive and clear a few more casing mismatches: In umbraco.presentation/umbraco/umbraco.aspx change all occurrences of UmbracoSpeechBubbleBackend to UmbracoSpeechBubbleBackEnd, and also in the whole solution replace tabView with tabview (for umbraco_client/tabview/images)
Also do a search and replace changing speechBubble_close to speechbubble_close (for the speech bubble close image)
Now we are left with two ScriptResource not found errors, and some Dashboard load errors.

Fix the dashboard
In umbraco.presentation/config/Dashboard.config, replace file references to Pascal casing so as to match the file names.
There are a few images fixed in the same manner: tv.png to TV.png, and listitemorange.gif to listItemOrange.gif, feedproxy.aspx to FeedProxy.aspx
This completes the fixes for the Dashboard. The last two tabs are not in working order, and I will ignore them for now.


This completes the changes needed to make the interface load. Most of the changes have to do with mismatches between actual file name casing and the hard coded references to those files. There are a number of approaches possible, e.g., all file names can be abstracted into a separate file - where possible. This would help. Fixes do not need to be applied in code, but can be applied to file and folder names - even symbolic links can be used. I have gone the hard way - replacing hard coded values - to illustrate the extent of the issue.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.