Help - Search - Members - Calendar
Full Version: xmlrpc API and plugins are mutually exclusive
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Tschepsit
I originally posted this on the plugins board, but it looks like it's a more general issue with posting via the xmlrpc API.
Original Post

Basically, whenever I try to make a post using metaweblog.newPost or editPost, I get the following error:
QUOTE
Fault returned from XML RPC Server, fault code Server: Rebuild error: Building entry 'Entry Title' failed: Build error in template 'Date-Based Archive Template': Error in tag: Error in tag: You used an <$MTCategoryArchiveLink$> tag outside of the proper context.

This does not happen if I rebuild everything inside mt.cgi.  It only happens when rebuild_entry is called during an xmlrpc post.  It seems to affect every plugin-based tag that I use.

There is a little bit more detail in the original post.
btrott
That's bizarre. Does it happen when you save that particular post in MT? That's when rebuild_entry would be called--if you rebuild via the popup window, rebuild_entry is bypassed.
Tschepsit
No, it only happens when saving the post via xmlrpc.  I can save it from within the MT application without any trouble.  The odd thing is, the modifications to the post via xmlrpc are successful, but the rebuild is not.  

If I modify the post via xmlrpc (and the rebuild fails), I can then go into mt.cgi and click the save button, and the rebuild works fine.
btrott
Hmm, so yes, it does seem like the plugins are not being loaded. I'll check into this some more. I think that if this were happening in general, more people would have complained about it--I wonder if it's something particular to your setup?
Tschepsit
Could be something in our setup, we're running on an old NT 4.0 server.  We don't have much configured in the mt.cfg file:
QUOTE
CGIPath http://servername/cgi-bin/MT/
DataSource e:\db
StaticWebPath /MT-1.4/
TemplatePath E:\InetPub\cgi-bin\MT\tmpl\
Tschepsit
I have converted to MySQL now, but the problem still exists.  Also, if I have a line in the mt.cfg file to set an absolute value for PluginPath:
QUOTE
PluginPath E:\InetPub\cgi-bin\MT\plugins\

xmlrpc fails altogether with the message
QUOTE
Fault returned from XML RPC Server, fault code Server: Can't locate object method "_login" via package "mt" (perhaps you forgot to load "mt"?) at E:\InetPub\cgi-bin\mt251\lib/MT/XMLRPCServer.pm line 556.


If pluginpath is relative to the MT\ directory, then I still get the original error.
Tschepsit
Ok, the PluginPath was the problem.  I just had a homegrown plugin that was interfering with it.  Once I removed the bad plugin and correctly set the plugin path in mt.cfg, it worked correctly.
Daemon
Just how exactly do you correctly set the plugin path? I am having some problems with plugins myself and think this might be the problem as well as the solution... help?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.