blogapi.module: Blog ID and Validate For New Posts

jdfrankl - February 10, 2008 - 00:15
Project:Drupal
Version:6.x-dev
Component:blogapi.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Posting with MarsEdit, validation is failing in blogapi.module for new posts in RC4 because of the blog ID (see below). Prior versions would map a blog ID of "1" to a content type of "blog". In RC4 the blogapi module is treating the blog ID as synonymous with content type on new posts. Updates to existing posts are unaffected and work correctly. Changing the blog ID to "blog" in MarsEdit works around this issue. Is this by design or a bug?

Request text:
<?xml version="1.0" encoding="utf-8"?>
<methodCall>
<methodName>metaWeblog.newPost</methodName>
<params>
<param>
<value><string>1</string></value>
</param>
<param>
<value><string>[user]</string></value>
</param>
<param>
<value><string>[password]</string></value>
</param>
<param>
<value>
<struct>
<member>
<name>mt_allow_comments</name>
<value><int>1</int></value>
</member>
<member>
<name>mt_tags</name>
<value><string></string></value>
</member>
<member>
<name>mt_keywords</name>
<value><string></string></value>
</member>
<member>
<name>mt_convert_breaks</name>
<value><string>0</string></value>
</member>
<member>
<name>title</name>
<value><string>foo</string></value>
</member>
<member>
<name>mt_excerpt</name>
<value><string></string></value>
</member>
<member>
<name>description</name>
<value><string>foo</string></value>
</member>
<member>
<name>mt_text_more</name>
<value><string></string></value>
</member>
<member>
<name>mt_allow_pings</name>
<value><string>1</string></value>
</member>
</struct>
</value>
</param>
<param>
<value><boolean>0</boolean></value>
</param>
</params>
</methodCall>

Response text:
<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>1</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Blog API module is not configured to support the 1 content type, or you don't have sufficient permissions to post this type of content.</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>

#1

pwolanin - February 12, 2008 - 23:33

maybe duplicate to this issue? http://drupal.org/node/214209

#2

Arancaytar - February 13, 2008 - 12:51

No. The other issue was identified, fixed and committed before RC4 was released.

Changing from a numeric ID to the machine-readable content-type name is an API change in 6.x. Reconfiguring your blogging client to repeat the auto-discovery process should be enough. At most, I would suggest that Drupal display some helpful message to indicate that this reconfiguration is needed.

#3

moshe weitzman - February 15, 2008 - 20:35

Auto discovery does not fix the problem for MarsEdit.

#4

jdfrankl - February 16, 2008 - 01:46
Version:6.0-rc4» 6.0

I just upgraded to the official 6.0 release and confirmed that this was still an issue. I can also confirm that what Moshe reports is correct - auto discovery in MarsEdit still sets the Blog ID to "1".

#5

jdfrankl - March 24, 2008 - 22:55
Version:6.0» 6.1

This continues to be an issue with the 6.1 release.

#6

jdfrankl - March 25, 2008 - 14:36
Status:active» needs review

So according to this issue report the problem is that RSD returns a blog ID of "1" while the rest of the blogapi module is expecting a blog ID of "blog". So the blog ID that Drupal is handing for auto-discovery is out of sync with what the blogapi module now requires. Since the RSD blog ID is hard-coded anyway why not just change it to return "blog"? The attached patch changes the hard-coded blog ID returned by RSD from "1" to "blog".

AttachmentSizeStatusTest resultOperations
blogapi.module.6.1.rsd_.patch464 bytesIdleFailed: Failed to apply patch.View details | Re-test

#7

spatz4000 - May 11, 2009 - 19:07
Version:6.1» 7.x-dev

Simple re-roll.

AttachmentSizeStatusTest resultOperations
blogapi.module.patch674 bytesIdleFailed: Failed to apply patch.View details | Re-test

#8

System Message - May 12, 2009 - 01:10
Status:needs review» needs work

The last submitted patch failed testing.

#9

Chris Johnson - May 21, 2009 - 20:44
Version:7.x-dev» 6.x-dev
Status:needs work» needs review

Re-rolled patch for D6.12. This has been broken for over a year. Could we please get this simple, one line, 6 character patch applied?

If you read frustration in the above, you're correct. This lack of languishing in the issue queue is why I have stayed away from core issue queues for several years.

AttachmentSizeStatusTest resultOperations
blogapi.6.12.rsd_.patch747 bytesIgnoredNoneNone

#10

bstanfield - December 3, 2009 - 18:08

bump. Just tried to associated a new blog with Mars Edit today and this is still broken.

 
 

Drupal is a registered trademark of Dries Buytaert.