Converting to the open source GraffitiCMS

Once GraffitiCMS had been posted as open source, I downloaded it with the intent of upgrading this site to it. There wasn't much news on the Graffiti CodePlex page about what had changed since the latest official release (1.2). In particular, no news whether any of the proposed plans from the beginning of the year had been implemented, partially or not.

Since I wanted to fix certain problems with the product, I had to first make sure that my site worked with the released open source version. After that, I would be free to make the changes I needed. Here's a series of notes about my experiences in upgrading an existing site to the open-source Graffiti in case it helps someone else.

1. First things first. GraffitiCMS was originally released with VistaDB as the default database engine. Since VistaDB is a commercial product, Telligent could not provide it as part of the download. You should either purchase VistaDB itself if your site uses it as the database, or, more long-windedly, you should upgrade the database to SQL Server. As it happened I'd already done this a few weeks ago.

2. I downloaded the full existing site from GoDaddy's servers to create a test site on my PC, and added/configured it in IIS7. I also took a backup of the SQL Server database from GoDaddy, and restored it to a local instance on the same PC. I changed the web.config file so that the connection string pointed to the local database and tried the test site. It came up just fine. (Note: yeah, yeah, the victors rewrite history and all that. The first time I brought up the test site, I was wondering why it was taking so long so something running entirely locally. I'd of course forgotten to change the connection string, and so Graffiti was connecting to my public database over the internet. Sigh.)

3. Now that I had a baseline, it was time to "upgrade". I opened up the Graffiti solution in Visual Studio, rebuilt it, and copied the new DLLs over into the /bin folder of the test site. Running the site crashed Graffiti. Hmm.

4. The error was in global.ashx, so I decided to diff the old and the new versions to see what difference there was. In essence the interface to SiteSettings has changed: there is now an explicit method call to get the singleton object. So, I copied over the new global.ashx and all the aspx files as well (the diff showed some of them had changed too). I copied over the new web.config, changed the connection string, and brought the site up. It displayed the home page fine, and then I played around with some of the features to check.

5. Adding a new post though would crash the site. This was a puzzler: I checked the diffs of all the files and everything and they were the same. What was going on? Finally it came to me: on my test site I was using a several plug-ins (including a couple of mine); maybe one of those was at fault? The first identified was Scott Watermasysk's plug-in DLL (ScottWatermasysk.Graffiti.Plugins). This provides Twitter notification for new blog posts and provides a list of related posts for an RSS feed. Scott provides the source, so it was just the work of a moment to recompile, locate the usages of SiteSettings and modify them to use the new Get() syntax. Recompile, retest, and crash.

7. It turns out that another plug-in was responsible: the BlogExtensions plug-in, provided by Telligent. This plug-in provides several services, of which I use 2: the comments RSS feed and the pingback/trackback support. I didn't have the source already, but found it on the Google code site. Again the matter of moments to locate issues, fix, recompile.

8. There was one final issue to fix: there's a new item in the Site Options part of the Graffiti Admin pages called Configuration. All that was needed was to create the folder and copy the relevant ASPX file to the test site.

I now have an upgraded baseline using the open-source Graffiti, one from which I could fix bugs, test, and deploy. The first item was to add support for Posterous, but that's a tale for another day.

Loading similar posts...   Loading links to posts on similar topics...

1 Response

#1 Open source GraffitiCMS and IIS6 said...
05-Jan-10 5:07 PM

Color me stupid, but then again I was under some emotional pressure at the time. The open source version of GraffitiCMS has some changes in it compared to the final official commercial release. Well, duh, I suppose; and of course I'd mentioned some of

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

  •  Emphasize with italics: surround word with underscores _emphasis_
  •  Emphasize strongly: surround word with double-asterisks **strong**
  •  Link: surround text with square brackets, url with parentheses [text](url)
  •  Inline code: surround text with backticks `IEnumerable`
  •  Unordered list: start each line with an asterisk, space * an item
  •  Ordered list: start each line with a digit, period, space 1. an item
  •  Insert code block: start each line with four spaces
  •  Insert blockquote: start each line with right-angle-bracket, space > Now is the time...
Preview of response