Tim

Footprints in the snow of a warped mind

Fix missing JavaScript file when you rename the Umbraco admin directory

Where to find me

Flickr Icon  Twitter Icon  Linked In Icon  FaceBook Icon  Windows Live Alerts Butterfly  RSS 2.0 

Tag Cloud

AJAX (4) ASP (6) ASP.Net (50) Error Reporting (4) Web Service (1) WSDL (1) Atlas (2) Business (76) Business Start-up Advice (25) Client (14) Expanding Your Business (17) C# (16) Canoeing (4) Canoe Racing (5) Cheshire Ring Race (5) Racing (2) Training (4) CIMA (1) Cisco (1) 7970G (1) CSS (3) dasBlog (4) DDD (1) Design (9) Icons (1) Development (12) General (39) Christmas (6) Fun and Games (11) Internet (22) Random (46) RX-8 (8) Home Cinema (2) Hosting (2) IIS (10) iPhone (1) JavaScript (4) jQuery (1) Marketing (5) Email (1) Multipack (1) Networking (2) Nintendo (1) OS Commerce (1) Photography (1) PHP (1) PowerShell (2) Press Release (1) Productivity (2) Security (2) SEO (5) Server Maintenance (4) Server Management (9) Social Media (1) Social Networking (2) Experiment (1) Software (9) Office (5) Visual Studio (12) Windows (4) Vista (1) SQL (1) SQL Server (13) Stored Procedure (1) Testing (1) The Site Doctor (104) Turnover Challenge (1) Twitter (2) Umbraco (17) 2009 (1) Web Development (54) WebDD (33) Wii (1)

Blog Archive

Search

<April 2009>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Recent Comments

Blog Archive

Various Links

Blogs I Read

[Feed] Google Blog
Official Google Webmaster Central Blog
[Feed] Matt Cutts
Gadgets, Google, and SEO
[Feed] Ol' Deano's Blog
My mate Dean's blog on my space, equally as random as mine but not off on as much of a tangent!
[Feed] Sam's Blog
Sam is one of my younger brothers studying Product Design and Manufacture at Loughborough, this is his blog :) Enjoy!

Recent Tracks

last.fm - The Social Music Revolution

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

newtelligence dasBlog 2.2.8279.16125

Send mail to the author(s) Email Me (Tim Gaunt)

© 2010 Tim Gaunt.

Sign In

    # Tuesday, April 28, 2009

    Fix missing JavaScript file when you rename the Umbraco admin directory

    Tuesday, April 28, 2009 6:49:48 PM (GMT Daylight Time, UTC+01:00)

    The Error

    For those of you who have tried to rename your Umbraco installation directory to something other than the default /umbraco/ you'll have found that TreeInit.aspx throws a JavaScript error along the lines of:

    Message: Object expected
    Line: 1
    Char: 4236
    Code: 0
    URI: http://www.yourdomain.co.uk/youradmindirector/js/xloadtree.js

    As this only really affects the refresh of the tree/close of a couple of dialogues I've not bothered fixing it but basically the issue is outlined well here: http://tinyurl.com/cx9atv

    The Fix

    If you're using extension less URLs already then it's easy as pie to sort:

    1. Open your UrlRewriting config file (/config/UrlRewriting.config)
    2. Add this above "</rewrites>":
    <...>
    <add name="missingjs" 
        virtualUrl="^~/## YOUR ADMIN DIRECTORY GOES HERE ##_client/ui/(.*).js" 
        rewriteUrlParameter="ExcludeFromClientQueryString" 
        destinationUrl="~/umbraco_client/ui/$1.js" 
        ignoreCase="true" />

    If you've not already using extension less URLs don't panic, that's easy to setup you can read all about it here. Alternatively you could just copy the js files from one folder to another ;)

    The Why

    I don't know how many people already rename their admin dir from something else but as Umbraco becomes a more popular choice of CMS you really should consider hiding the folder (the more popular it becomes, the more people will become more familiar with the default admin directory of /umbraco/).

    Although there hasn't yet been a breach (AFAIAA) if a vulnerability is found, the first step in prevention is obfuscation -hide your admin directory! A quick Google search will show you how easy some developers have made it for you to find their admin sites.