MT-Moderate 1.1.0 »
After extensive testing, and some excellent help from Iain and Kate, I think we've licked the problems under Windows servers. The problem has to do with the way that Movable Type handles the path when processing plugins. MT-Moderate and some other plugins use a new technique known as a plugin envelope to make using the plugin a bit easier. Everything is installed in one location - typically a subdirectory of the plugins directory.
The problem is that Windows servers supply the path as a Windows path - something like C:\MT. Then regular expressions like those used in MT interpret the \M as a special character, which blows up the plugin. It will often still work, but it will cause error messages at the very least.
With version 1.1.0, you can place the code files for MT-Moderate in one of two places. Either in the plugin directory, which will make things easier going forward, or you can place part of the code into the extlib (which is where it has previously resided). The code in MT-Moderate will adjust for this accordingly.
The end result is that MT-Moderate 1.1.0 ought to work equally well under all systems.
One downside is that a lot of potential solutions were tried prior to settling on this method, so there are some old files left from prior installs. You should pay extra close attention to the steps in the documentation (in the archive) and make sure you remove all of these old files, to minimize any potential for conflicts.
Update: Yes, I've updated things already. Mostly the CSS in the list_ping.tmpl file - I had the styles defined inline for ease of getting it done, and Boris subtly reminded me that it should be done differently. Version 1.1.1 is now available when you follow the download link.





















Comments (31)
Something odd is going on. I added MT-Moderate last night and two people have commented since. Those comments show as "approved" but they do not display on the individual entry archives. Is there a setting to force the individual page rebuild?
Posted by Josh Poulson on March 9, 2005 12:34 PM
MT-Moderate doesn't have anything to do with rebuilds. It only runs a callback during the Comment (and Trackback) post process. If the comment is approved, MT-Moderate isn't doing anything at all. As such, it's very unlikely that this problem has anything directly related to do with MT-Moderate. Sorry.
Posted by Chad Everett on March 9, 2005 2:06 PM
After getting fed up of having umpteen million (well, a couple dozen) gambling-related trackbacks sent to my blog, I realized something needed to be done. Your plugin fits the bill perfectly, and your efforts in writing this script are much appreciated! The tagline at the bottom of my site now reads "Powered by Movable Type and MT-Moderate". Thanks for an excellent addition to an excellent blogging platform!
Posted by Dan Carlson on March 11, 2005 10:47 AM
Your update says that the download link should yield Release 1.1.1, but I just downloaded the .zip file and all the files within say Release 1.1.0.
Did the Release numbers in the files not get updated, or is the link not taking me to the revised .zip file, or what?
Thanks for taking the time to put this together, by the way.
-Brent
Posted by Brent Chapman on March 12, 2005 3:04 PM
Looks very promising. I just unpacked the file and uploaded it, but it seems the plugin.pm file isn't in the package. According to the documentation it should go into:
MT_DIR/plugins/jayseae/lib/jayseae/plugin.pm
Is this plugin.pm dropped from the .zip file, or should it be in there and I need another pair of glasses?
Posted by nv1962 on March 13, 2005 3:33 AM
Some of the version numbers were not updated in the 1.1.1 archive. Also, the plugin.pm file is not needed. This was a test configuration that never did anything useful for us, so it was removed. The documentation wasn't updated.
The download link should now provide you with 1.1.2, which should have correct version numbers and should also have a corrected text file that includes plugin.pm only in a list of files to remove if it exists.
Let me know if you have any problems.
Posted by Chad Everett on March 13, 2005 4:32 PM
Good, because it works without a hitch here and that tends to worry me! Thanks for the hard work, jayseae.
Posted by nv1962 on March 13, 2005 4:37 PM
It would be a nice touch if Movable Types main menu could say
Total Posts: 710 | Total Comments: 57 | Total trackbacks: 17 | Total Authors: 1
although I don't know if it's doable and it's certainly not necessary.
Thanks for a great tool!
Posted by Jenx on March 16, 2005 7:54 AM
I'm having odd problems with this.
I tracked-back some of the oldest entries in a blog on our server and the entries are marked pending in the trackbacks list, but they appear on the page.
I have MT 3.15, MT-Blacklist, MT-Moderate 1,1,1 (w/comments.pm removed)
I have some older plugins (MT-simple comments) to thread trackbacks and comments and either a plugin or a hack to rebuild on trackbacks.
Do you know why this would mark a trackback pending approval and then post it anyway? What can I do to help you track this down?
--Michael
Posted by Michael Croft on March 16, 2005 9:48 PM
The method used by MT-Moderate to keep trackbacks from appearing will work with any standard MT rebuilding tools - for instance, rebuilding on a trackback.
It will not, however, work with other tags - for instance, Adam's SimpleComments. I've attempted to contact Adam about this, but have received no reply from him.
That tells me that he is likely very busy and doesn't have time to make this change. For the time being, the two are incompatible.
I am similarly very busy and have no time to hack at his plugin to make it work correctly. I will do so if I get the chance. Until then, you will only be able to use one or the other. Sorry.
Posted by Chad Everett on March 17, 2005 8:45 AM
Thanks, I'll see if I can hack SimpleComments. I really prefer the interlaced layout. I'll reply here if I get something working.
Posted by Michaell on March 17, 2005 11:39 AM
I've been running the plugin for a few days and notice that trackbacks do indeed show up as "pending" in the list, but are also still visible on my site. Is there anything I should be looking for to explain why it doesn't work?
I am running:
Version 3.15
with only MTCloseComments, and nofollow
you can see an example of what I mean here.
Posted by Bill on March 23, 2005 2:42 PM
Hi Bill - Unfortunately, your link doesn't tell me anything. I can see trackbacks there in your popup form, but I have no idea which are approved and which are not. If you are using the standard MTPings container, then it ought to work fine. If you are using any kind of replacement - for instance, SimpleComments, it likely will not work unless that author has updated their code.
Posted by Chad Everett on March 24, 2005 8:00 AM
Thanks for responding, Jayseae. All of the trackbacks on my site are recent spam and are "pending" but still show. I'm not using SimpleComments. I've been too busy to dig further, but as soon as I get some cycles I'll walk through the code and see if I can see what's happening in my case. I'll let you know if I find anything.
Posted by Bill on March 24, 2005 9:51 PM
Hi,
Great plugin and works well. As you said it doesn't work with SimpleComments. It also doesn't work with GlobalListings, which is a big pity as I use those two plugins more than any other.
However since I'm sick and tired of spam, I'll have to take out SimpleComments and GlobalListing or rework the design till someone hopfully gets a chance to update the plugins so they work together.
Otherwise thanks for the plug in. Anything that stops the spammers, is good by me.
Adrian
Posted by Adrian on March 28, 2005 6:20 AM
Quick question, is there anyway to have MT-Moderate call the "Comment Pending Template" so that genuine commentators (yeah the few of them aren't peddling spam) know why their comment isn't appearing?
Posted by Adrian on March 28, 2005 9:56 AM
As mentioned before (though not necessarily on this page), the current design of Movable Type doesn't permit filter callbacks to alter the processing of the post. That is, the filter stops processing if you tell it there is problem - which is not what MT-Moderate does, because we want the comment and the filter will drop it entirely.
If Six Apart introduces a moderation filter, then it might be possible. If there's a huge outpouring of demand, I may hack something into it - but I'd really prefer the former. That would be a much cleaner solution. I don't like to redefine existing functions if I can help it.
Posted by Chad Everett on March 28, 2005 10:02 AM
I installes the plug-in, and it seems to work alright: I had a few trackbacks to old entries set to pending. However, in my activity log, I find the following:
Plugin error: /home/site/public_html/cgi-bin/mt/plugins/jayseae/moderate.pl Can't locate jayseae/moderate.pm in @INC (@INC contains: ./plugins/jayseae/lib plugins/Blacklist/lib ./plugins/Blacklist/lib ./lib /home/site/public_html/cgi-bin/mt/extlib /
What is happening here?
Posted by Jeroen on March 29, 2005 5:40 AM
Tough to say - the information is somewhat contradictory. If the moderate.pm module cannot be found, then it's perhaps unlikely that trackbacks will be moderated, but you say that they are. This needs to exist in a jayseae directory under:
Thus making the full path look something like this:
Naturally there is some more path information prior to "plugins" - notably your main MT directory.
One easy way to check to see if it's in the right location is to look on your main menu, and see if MT-Moderate shows up under the list of active plugins. If so, and provided you are using version 1.1.2 or higher, then it's in the correct location. If you are using 1.1.1 or lower, this won't help with that at all.
Posted by Chad Everett on March 29, 2005 5:47 AM
The plugin does show up in my main menu, and all files appear to be in the right location. I guess I simply try the windows method: remove the plugin, and install it again :-)
Posted by Jeroen on March 31, 2005 12:14 PM
I just found out that a reinstall did not solve the problem. The same message still shows up in my log, and even worse, I found a trackback message on my page, even though it was listed in MT as 'to be aproved'.
MT-Moderate (1.1.2) does show up under the list of active plugins, so I guess it should work. Any other things I might try?
Posted by Jeroen on April 5, 2005 1:57 PM
I am seeing the same path problem, and I am certain that the plugin is in the correct location, and that all files are there.
The error I see happens every time I look at the administrative interface for the SpamLookup plugin
Setting 'use lib' to use an absolute path "solved" the problem.
Posted by Arve on April 10, 2005 6:19 AM
I just installed MT-Moderate, and starting seeing error messages similar to the one in comment #18:
Plugin error: /home/tweezer/public_html/scgi-bin/mt3/plugins/jayseae/moderate.pl Can't locate jayseae/moderate.pm in @INC (@INC contains: ./plugins/jayseae/lib /home/tweezer/public_html/scgi-bin/mt3/plugins/Blacklist/lib /home/tweezer/public_html/scgi-bin
My problem is caused by the fact that I have cron jobs that call MT-Rebuild to periodically rebuild templates in my MT blogs. When the cron job runs, the current directory is *not* my MT directory, so a plugin that relies on what the current directory is to load libraries will fail.
I modified lines 30 and 31 in plugins/jayseae/moderate.pl to specify a full server path instead of relative one:
if (eval { use lib '/home/tweezer/public_html/scgi-bin/mt3/plugins/jayseae/lib'; 1 }) {
use lib '/home/tweezer/public_html/scgi-bin/mt3/plugins/jayseae/lib';
}
Posted by David Phillips (TweezerMan) on April 10, 2005 12:16 PM
Sure enough, that should work - though everyone will have to manually enter the full path, which will differ for each install. I'll see if I can figure out a reliable way to determine the full path for a future release.
Posted by Chad Everett on April 10, 2005 3:54 PM
I ran into the same problem with the lib path (Linux; Perl 5.8.1; MT-Moderate 1.1.2).
Posted by a-giau on April 15, 2005 1:26 AM
Add me to the list of people getting the same error. In my case it occurs when I access MT-Blacklist (Though I don't know why MT-Blacklist is calling MT-Moderate when I'm just looking at the main menu screen for it...)
Adding the full path to MT-Moderate fixed it, of course.
Thanks for one cool plugin, BTW :)
Posted by Alden Bates on May 11, 2005 5:46 AM
I'm seeing the same error, it's happening for Moderate, but also for Blacklist since I installed Moderate. I'm trying TweezerMan's solution to see what happens.
Posted by Jamison on May 14, 2005 10:18 PM
I've got the same problem. Will give TweezerMan's solution a shot to see if it fixes the problem.
Posted by Red Wolf on May 23, 2005 4:26 AM
I am having the same problem -- trackbacks showing up as Pending in the list, but still appearing on the pages. I also have MT-blacklist installed. MT 3.16.
We tried Tweezerman's fix and it stopped the error msg we were seeing in the activity logs, which others have posted here. However, we're still getting pending trackbacks showing up live on pages.
Posted by Dwight Silverman on June 7, 2005 5:44 PM
If installed correctly, then your static pages must be rebuilt and they won't show pending trackbacks. If you are using dynamic pages, then this won't work at all, unless you are using the Simple Comments plugin with the necessary updates.
Posted by Chad Everett on June 9, 2005 2:07 PM
I added Mt-Moderate to my blog and was able to pend trackbacks. Then I approved one of the trackbacks, the otheres which were not approved were "pending" on my blog`s control panel.
However, on my blog, all of the trackbacks got approved and showed.
I hope the trackbacks which are not approved don`t be showed, and the approved trackbacks are showed on my blog.
The moderate.pm is that 'DIFF_ENTRY => -1' and
'DIFF_COMMENT => 1' in my blog.
Posted by Kz on August 29, 2005 9:50 AM