Scott's Recipes Logo

Scotts Radio -- Radio Exposed or I Delve Deep Under the Hood of Radio

Scotts Radio :: Radio Exposed or I Delve Deep Under the Hood of Radio
Last updated: 8/20/2002; 9:21:20 AM
 
The FuzzyBlog!

Marketing 101. Consulting 101. PHP Consulting. Random geeky stuff. I Blog Therefore I Am.

Scotts Radio :: Radio Exposed or I Delve Deep Under the Hood of Radio

Radio UserLand Exposed

When Things Break, You're Still Probably Ok
Version 0.9

J. Scott Johnson edited by Guy K. Haas


Cliveden House, England
 

 

PREFACE

This document was written after my Radio weblog up and ate itself one fine Sunday morning.  I recovered everything after some interesting excursions into Radio and at least one prayer session while facing towards Silicon Valley.

Please send suggestions, comments and flames to sjohnson@fuzzygroup.com.

 

It should be noted that I’m not writing this because these materials don’t exist elsewhere.  I don’t know if they exist elsewhere but I don’t think that there is this comprehensive a treatment of Radio Exposed and I hope it’s useful to someone other than myself.

Scott

Table of Contents

The following topics are covered in this document: 

When Your Data Goes Away or Don’t Worry Be Happy

This document was written after two to three hours of hacking away at Radio after one Sunday morning, when, GULP, my weblog disappeared.  And, I don’t mean just locally, I mean on radio.weblogs.com.  I add “Don’t Worry Be Happy” because there is a happy ending – I got everything back.

Anyway, here’s what happened.

[Macro error: Can’t evaluate the expression because the name “when” hasn’t been defined.]
 

At this point I realized that I had a real problem and started to think (or panic). 

Understanding How Radio Works

The first thing that I did was search my backup directory for some keywords I knew that I had used in my weblog entries.  This confirmed that, yes, I did still have a local copy of my data.  Knowing that I had a copy of my data let me breathe easier.  Even if I had to reformat it or change it somehow, I figured that I’d at least still have the raw text.  Still, I didn’t want to do that (lazy).  I figured that there had to be a way to restore my Radio installation.

Looking Back at My “when” Error

The first thing that I did was think about the very first error I saw or:

[Macro error: Can’t evaluate the expression because the name “when” hasn’t been defined.]
 

Knowing that a weblog is chronological in nature, I came to the initial conclusion:

“when” must be some kind of meta level object that is used to define a date (hey, it’s _when_) and then when I published the entire website, because it couldn’t decide what date was going on, it didn’t insert ANY DATA into each day’s page template, thus overwriting each weblog entry.

From this I decided that there must be some Table of Contents somewhere that defines “when”.  My guess was that “when” must have gotten broken somehow and if I could only fix it, I would be back in business.  This brought me to the mysterious and unusual .root files.

What is a .root File?

When Radio is installed, several files with the extension of .root are installed.  These are:

A .root file is really a small database, specifically an object database.  These .root files can contain virtually anything that Radio deals with including scripts, macros and, tada, the text of every post you make.  Here is what each Radio.root file does:

I figured out that weblogData.root was the right file by a couple of things, specifically:

Before I go into how I fixed this, it’s worth talking about how Radio produces HTML, and about its directory structure.

How Radio Produces HTML

If you have ever looked inside the wwwyearmonthday directory, you have probably seen files named “01.txt”, “02.txt” and so on.  These files represent your weblog posts.  Here is what one of these contains:

#flHomePage true
#flArchivePage true
#archiveDate “2002/04/13”
<%radio.macros.viewWeblog ()%>
 

This is basically telling Radio to view the weblog for 04/13/2002.  Remember, I said “represent”, not that it was the post.  In essence Radio reads this file and then fills in the content when it upstreams your weblog posting to the server.  Looking at this file is one of the things that convinced me that my data must exist somewhere else.  The question was where.

What Directories Does Radio Store Content In?

At this point, you will probably be relieved to know that Radio automatically makes an archive of your content in the directory:

program filesRadio UserLandbackupsweblogArchive

This contains an XML-tagged archive of all of your weblog entries.  This includes all posts.  

In the directory: 

program filesRadio UserLandbackupsrendering

there is a backup of all posts, stories and categories in HTML format.  Note that even though this exists when you use the Publish Entire Website command from within Radio, it can get overwritten when Radio regenerates your HTML.  Here’s a tip: Periodically Zip the whole directory tree.  Disk space is cheap and your weblog is valuable.  If you want to go a step further, download SecondCopy from www.secondcopy.com which can automatically Zip directories for you. 

Here is a UserLand article on Radio’s directory structure.

How I Fixed the “When” Problem and Rescued my Weblog

WARNING

Make a backup copy of webLogData.root before doing this.  It can get mucked up when you start fiddling with it and you need to be bloody well careful!  You've been warned. 

This is what you have all been waiting for.  I went into the full version of Radio and selected from the Window command to go to webLogData.root.  This looks like this: 

Here’s what you see at first.  If you don’t see this then go to the Outline menu and select CollapseEverything.

Double click the triangle and you should get this: 

Do it again but this time on Posts to get: 

Now do it on an individual post.  You should get something like this: 

Notice the “when” field in the picture above.  This indicates when the post was published.  Somehow, and I don’t really understand how, the “when” value for three last posts had gotten set to “” (i.e. nothing).  All I need to do to get my weblog back was this: 

Right click on each post with no value in the “when” field and click Cut.

Save the webLogData.root file with the Save command on the File menu.

Use Radio > Publish > Entire Website as shown below:     

I checked my weblog and, voila, like magic, all my posts were restored.  There now, that wasn’t so hard, was it?

What Archives Can I Recover From if I Can’t Solve this Problem?

In the event that you have this or another problem and cannot recover your webLogData.root file, Radio helpfully archives every single weblog posting that you make to .XML files on your local hard drive.  These files have an appearance like that shown below:

  <?xml version="1.0" ?>

- <table name=" 00000005 ">

  <boolean name=" flNotOnHomePage " value=" false " />

  <string name=" text " value=" <H3><FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif>A Fleeting Glimpse of Fame</FONT></H3> <P>Interesting.  <A href=”http://www.scripting.com/”>Dave Winer</A> just linked to me.  Hmmm…  I guess I have to write some more about Radio.  It really is a fascinating product and I am starting to understand it more.  </P> <P> </P> " />

  <string name=" title " value=" A Fleeting Glimpse of Fame " />

  <date name=" when " value=" Sun, 31 Mar 2002 20:27:13 GMT " />

  </table>

These archives are stored in the directory: Program FilesRadio UserLandbackupsweblogArchive in the “posts” and “categories” subdirectories.

Here is the Radio documentation on its archiving.  Here is some more information.  There is also more information on this earlier in this article.

Tools that Made this Possible

Learning all this about Radio would not have been possible without the following resources:

The Radio Discussion forums at http://radio.userland.com/discuss/

My own Google-based Radio UserLand search tool at http://www.fuzzygroup.com/radiosearch/

The Original Version of This

This discovery and analysis process can be seen from the beginning at:

http://radio.userland.com/discuss/msgReader$13330#13341

These are a series of discussion group postings that I made looking for help.  

Thanks

My sincere thanks are extended to Lawrence Lee of UserLand who gave me exactly the right answer which I got after I had fixed the problem only because of the East Coast - West Coast time difference.  If I’d been on the West Coast, Lawrence would have had me up and running in no time.

Distribution of this Document

See Below.

If You're a Mac User

DISCLAIMER: This document, while not Macintosh hostile, is written from the perspective of a Windows user and the examples reflect this.  Please direct the obligatory violent, hostile platform flames to sjohnson@fuzzygroup.com.  

Note: I also have an iMac.

Copyright (c) 2002, J. Scott Johnson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections being, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled " Appendix 1 - Terms of Use ". Note: I'm new to writing a Free Documentation statement and the above might not be perfect. 

comment []

 
Copyright 2002 © The FuzzyStuff