February 18, 2005

URL's in Comments

Adam Kalsey writes:

Of the 2514 comments I have across all blogs managed by this install of MT, 1723 contain a URL, but 92 of those only have a URL in the comment body.
I just did a count of my own comments. Of the three comments on my MT managed blog, every one of them has a URL in either the body or the comment or the URL field of the comment form.

Yes, I'm being sarcastic.

February 11, 2005

MT Comments Back

For the longest time the comments on my blog haven't been working.

I noticed a couple of months ago when I tried to add a comment to a post to test the nofollow plugin and I received an interesting message:

An error occured:

no entry_id

So I started messing around with it. I figured out that if I changed the form method to GET in the MT template for the individual archives I could get a comment to go through, but I really wanted POST.

I don't know how long I spent on it, but I had to let it go.

Finally, this evening I revisited the issue. I tried to post a comment. No luck. I upgraded MT. Still nothing. Finally I checked the error and access logs on my web server. Here's what I found:

"GET /mt/mt-comments.cgi HTTP/1.1"

Huh?

I opened up the View Page Info dialog in Firefox and looked at the Forms tab. What I saw bugged me. The form method was set to POST, but the action was http://kb0off.sheddwellers.org/mt/mt-comments.cgi. This is a former address of my web site. The name still points to my server, but I have a RedirectMatch direective that sends all of the traffic from that domain to jeremiah.oeltjen.us.

I quickly realized that the value of the <$MTCGIPath$> variable is set in mt.cfg, not through the MT configuration dialogs. (The blog path setting is there for a specific blog.) That's why it wasn't working. Everytime a comment was posted it went to the old address which got redirected to the new address and converted to a GET request with no parameters.

Morals of the story:

  1. If you can help it, never move your blog to a new address.
  2. If you must migrate to a new domain name (not necessarily a new server), grep through ALL of your configuration files for your old name.

February 10, 2005

Running CVS on an alternate port

For our database class this semester our professor is encouraging us to use CVS for our projects. This is especially useful for the fact that we are working in small groups.

Getting CVS to work in MacOS X was a breeze. I installed the Apple development tools almost immediately after I got my PowerBook, so I already had CVS on my machine. I just had to set up a pserver to get everything to fly. This wan't difficult on OS X either. There are several places on the web that describe how to do this.

I set up a pserver on the server I use for my web hosting because it was the most convenient for all of us. This way none of our team members will have to open up their Internet connections and leave a machine running at home. The machine is there, this is just utilizing more spare cycles.

I used an alternate port for the school pserver and dedicated it to a new repository that will only have stuff for this class. (This turned out to be unnecessary as you can have more than one repository assigned to a pserver and each has its own passwd file, but I didn't think of that at the time.) Everything worked great for me when I connected to the repository in Eclipse and exported a project. I was also able to check out the project in TortiseCVS on windows, which is the GUI client for Windows that we were distributed for the class. The problem came when I attempted to connect with the command line cvs in OS X.

To make a long story short, the CVS that Apple distributes is version 1.10. This version doesn't support alternate port numbers in the :pserver: CVSROOT. I upgraded from source and everything works wonderfully.

So, there it is. If you are attempting to use alternate port numbers and the server is giving you an error that claims there is no such repository with the port number at the beginning of the path, check your CVS version.