Blogapi will not function without blog.module

Steven Merrill - January 26, 2008 - 05:26
Project:Drupal
Version:5.7
Component:blogapi.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've been working on building a Drupal 5.6 site that does not make use of blog.module. I enabled blogapi.module and set one of my CCK content types to be publishable, but no matter what I did, I kept getting the same error in any of several desktop blogging applications, You either tried to edit somebody else's blog or you don't have permission to edit your own blog.

That error is from the following code in blogapi.module, lines 512 - 519:

  if ($user->uid) {
    if (user_access('edit own blog', $user)) {
      return $user;
    }
    else {
      return t("You either tried to edit somebody else's blog or you don't have permission to edit your own blog.");
    }
  }

The 'edit own blog' permission, is from blog.module, so without blog.module enabled, only uid 1 will ever be able to post content via blogapi, regardless of the settings in admin/settings/blogapi .

It looks like this has been fixed in the HEAD version of 6, so what's the proper approach to this for 5? Should we:

  1. Make blogapi.module require blog.module,
  2. Backport the fix from Drupal 6, or
  3. Instead check to see if the user in question can edit the content type they're attempting to post

Please let me know, and I'd be willing to try my hand at a patch - I just want to know what path is the right one to take on this.

#1

Steven Merrill - January 26, 2008 - 05:27
Status:active» postponed (maintainer needs more info)

A quick status change, because I know what's wrong, but would like guidance on the right way to go about fixing this issue.

#2

shrop - May 25, 2008 - 20:14
Version:5.6» 5.7
Status:postponed (maintainer needs more info)» needs review

Hello Steven,

I back ported the changes from Drupal 6.2. I had the same issue with the Drupal 5.7 blogapi.module. I wanted to use Ecto or MarsEdit with my blog and did not need the blog.module installed since I am using a custom content type for blog entries. I have attached a patch for Drupal 5.7 blogapi.module below. It would be great if this could be committed to Drupal 5 core.

Thanks!
Mark

AttachmentSize
blogapi-do-not-require-blog.module.patch 697 bytes

#3

drumm - May 26, 2008 - 07:53
Status:needs review» fixed

Committed to 5.x.

#4

Anonymous (not verified) - June 9, 2008 - 08:13
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.