posted on Saturday, February 05, 2005 6:19 PM by Benjy

DNN 3.0.9 and how DB hacking can be useful

Had a narrow escape today. Installed DNN 3.0.9 and updated the site I'm working on at home. Just after finishing up some menus and pages, I decided to set the re-direction of who sees what page.  So this way ordinary users get directed to, say, the main page, registered users, on logging in, may get directed to a special page with announcements and news for members. Anyway, for some reason, there is also an option to direct the LOGIN menu somewhere other than the Login page (perhaps to an enriched login module ?). In retrospect, I'm not sure this should even be allowed cos it can lock you out of the site if you are not careful.

I accidentally directed the login page, from a default of [NOT SPECIFIED] to [HOME]. Since I was doing this in a hurry, I didnt stop to think of the fall out. As a consequence, whenever I clicked the Login link, it just showed me the home page and never allowed me to log in. It took me a while to realise what I had done and in the meantime I restarted IIS, backed up and restored the DB, all to no avail.

Anyway finally it dawned on me where I could go and check. Sure enough, in the Portals table the Tab ID's for each of those options are shown. I tried setting the LoginTabID column to 41 which is the actual TabID for the User Accounts module, but that didnt work. It turns out that it has to be updated to NULL to allow the login screen to be shown.

The lesson therefore, boys and girls, is that DB hacking on your own system can be invaluable :-). [Of course, common sense is even better!! If i had done the configuration mistake with the site being hosted by an ISP, that would have been the end - in terms of experimentation. There is  a SQL module in the Host option, but the ISP may not give enough DB permissions to do this kind of stuff].

A Note on 3.x Menus: It's also worth noting that the new fancy Horizontal and Vertical menu styles are available in all the skins out of the box in 3.x. Of course, if you load a 2.x skin, it wont have these new structures, but most 2.x skins work if they have been developed correctly. Probably also good to mention that you need to be logged in as host to upload new skins. Admins dont appear to have enough permissions (or maybe thats just some settings playing up).

Comments