blogapi.module: Blog ID and Validate For New Posts
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | blogapi.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
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
maybe duplicate to this issue? http://drupal.org/node/214209
#2
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
Auto discovery does not fix the problem for MarsEdit.
#4
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
This continues to be an issue with the 6.1 release.
#6
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".
#7
Simple re-roll.
#8
The last submitted patch failed testing.
#9
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.
#10
bump. Just tried to associated a new blog with Mars Edit today and this is still broken.