Categories

ME# can't get posts from Drupal

Thanks for a great update. I've started working with Drupal recently, and tried using MarsEdit 3 with it today. I'm getting a Get Recent Posts Error: Blog API module is not configured to support the 1 content type, or you don't have permissions to post this type of content.

As I have permissions for this user to blog, it must be something to do with the content type. Any clues from anyone using Drupal? I note there was a mention of this recently in a topic now closed.

Comments

Finally, ME3 seems to be able to post to the Drupal blog, but it posts the entries under user1, which is admin, and not the user in the USer Name and Password fields for that Drupal setup. (user1 has all privileges, more so than can be set through the Permissions interface.)

How can I get ME3 to post directly into a specific user account on Drupal 6?

Unfortunately this is sounding like something that may need to be debugged on the Drupal end. You can use the network log in MarsEdit to confirm that the proper user name and blog ID are being passed. That's about all MarsEdit can do to "encourage" Drupal to post the messages with the right user name, and to the right content type.

To clarify some of the original confusion in this thread, the "blog ID" for Drupal is always the content type. So yes, it should usually be "blog" if you want to post to your blog on Drupal, but could also sometimes be more appropriate as e.g. "story" depending on how the Drupal server is configured.

I've set up everything according to his instructions, and now I get a strange effect, which is that when I post as another user, having changed the user and password under the Blog->Enter Password, MarsEdit3 tells me that I do not have permission to publish it as a draft, even though it is clearly set as Published in MarsEdit.

Ah! That very well could be the problem. Thanks for reminding me about that.

I wish they wouldn't rely on cookies for authentication like that, but the fact it breaks more than just the text filters is a stronger motivator for me to work around the problem in MarsEdit.

I have a lot of issues to work through right now so I can't make any promises about when I'll get to this, but it's on the list and I'll be evaluating it as a candidate for a fix in a near-term update.

Hi Sasa - ecto has a nice feature which detects the specific blogs that are configured on your server. In MarsEdit unfortunately you need to know the blog ID, or in the case of Drupal, the "Content Type" that you are trying to connect to.

Open up the settings in MarsEdit by double-clicking the blog icon. Then look in the general pane and change the "Blog ID" from "1" to something else, mostly likely "story" or "blog" depending on how your Drupal server is configured.

Then close the settings and try Refreshing from MarsEdit. Does this help?

Glad that worked. I wish it was more user-friendly and hope to get there some day. One of the "excuses" for this is that Drupal users are a relatively tiny portion of my overall user base. But maybe that is changing :)

grsilverman: Is your account by any chance not an "admin" level account, i.e. does it have diminished permissions? I think this could be an issue some others have noticed, which is that Drupal relies on browser-cookies to authenticate some types of accounts.

I hope to get a fix into MarsEdit soon that works around this problem!

No joy -- it keeps reporting that I don't have permission to publish as a draft, but must publish it instead, even though I changed the status to published, and used both a user name and password, and an admin name and password.

I second that sigh... I wonder if the problem is to do with the fact that Drupal gives its blogs the user ID, so the actual Drupal URL for user1's blog and RSS feed are blog/1, blog/1/feed and user2 is blog/2, blog/2/feed etc.?

The other problem could be the user and password settings. Does Drupal use an ordinary password or an HTTP password?

I do find the learning curve on Drupal is fast at first until it hits its programming barrier. WordPress is a lot easier -- except for 3.0's multisite using subdomains! Subdirectories are a lot easier.

Last I checked Drupal just uses an ordinary password, but of course, obviously some things have changed since the cookies issue is new, so maybe there are other new issues in the latest Drupal releases as well.

Stuart, I have not been able to reproduce the problem you're describing.

Have you made sure that you have all the right settings in the Blog API configuration and in your users' roles? If you are still having trouble, can you capture the network log again? I think this might be a different problem you are running into than the general cookies/authentication issue that others were seeing.

I've figured out that to handle different blog accounts in Drupal, there has to be two separate blogs set up in MarsEdit: one for each account. (On auto-checking for setup, MarsEdit changes the blog ID back to "1" so it has to be manually changed back to "blog.")

Then, after entering the applicable user name and password in each blog instance, MarsEdit will return the correct listing of posts for that user -- but it's still giving the same error "Can’t post for [blogname] because the server reported an error: You do not have permission to save this post as a draft. Please publish it instead." when I try a new post, even if the post is set to 'publish' -- except for the admin user blog, which works as advertised.

So the bottom line for me is that the latest Marsedit (3.0.4) still won't publish to a Drupal blog other than for the primary user, who in Drupal has extra-special permissions not given to other users. I think that perhaps there lies the problem, it's to do with Drupal special permissions?

It seems as though the behavior has changed from Drupal 5 to Drupal 6. In Drupal 5 my blog ID was my user number on the server. The admin user is 1. Each successively created user has an incremented user ID. The user must have Blog API access in permissions even if it is user 1. And the specific Content Types have to be enabled for Blog API access.

The change in Drupal 6 is that the Blog ID is now the content type (ID name, not the description). So for a blog content type the Blog ID is "blog". You can create additional blogs in Mars Edit for each additional content type that you have. For example I have a content type called "tweet" that is managed as a separate stream.

I have not tested this with Drupal 7 yet. That's next. I'm glad the auto configure option exists for Drupal. It would be nice if it checked the version and set the blog ID accordingly.

Hi xevious - thanks for the information. I don't know if it's possible for MarsEdit to tell the version from the RSD. I'll have to look. I'm writing myself a bug to look at making the Drupal autoconfig work more seamlessly.