Ticket #900 (closed enhancement: fixed)

Opened 7 years ago

Last modified 4 years ago

support of mt_keywords

Reported by: anonymousbugger Owned by: rob1n
Priority: normal Milestone: 2.3
Component: XML-RPC Version: 2.2
Severity: normal Keywords: has-patch
Cc: redsweater, josephscott

Description

is missing, would be nice for use with eg technorati tags..

Attachments

xmlrpc.php.diff Download (4.0 KB) - added by redsweater 5 years ago.
Patch to support mt_keywords as conveyance of WP native tags. (Second upload with small fix)
900.diff Download (3.6 KB) - added by rob1n 5 years ago.
900-fixed.diff Download (3.6 KB) - added by westi 5 years ago.
Fixed patch
tags-xmlrpc.php.diff Download (3.6 KB) - added by josephscott 4 years ago.

Change History

  • Patch set to No

It shall be available to plugins once we add API hooks in xmlrpc.php.

(I'm the author of the previous note.)

  • Keywords bg|needs-patch added
  • Priority changed from normal to low
  • Milestone set to 2.1
  • Status changed from new to closed
  • Resolution set to wontfix

#2061 allows a plugin to handle this. Without native support for tags in WP, I think this should remain in the plugin domain.

Feel free to reopen with other thoughts.

  • Status changed from closed to reopened
  • Version changed from 1.5 to 2.2
  • Resolution wontfix deleted
  • Milestone changed from 2.1 to 2.2

In light of the last comment, it may be time to reopen this? Since 2.2 is adding native tagging support, the xmlrpc.php interface should support the mt_keywords parameter for MovableType.

If nobody else is inclined to work on this right now, I can probably do it.

I would recommend changing the priority from low to at least normal, since the missing functionality is glaring in the context of the native tagging support.

Daniel

Yep. Feel free to attach a patch, then assign it to me for looking over and possibly committing :).

  • Keywords needs-patch added; bg|needs-patch removed
  • Priority changed from low to normal

Attaching patch, xmlrpc.php.diff.

Summary:

  • Accept mt_keywords input as comma-separated tag names, supplied to wp_insert_post and wp_update_post.
  • Convey get_post_tags result as comma-separated string to generated XML for getRecentPosts and getPost.

One part I'm not sure about is the way I added an include() for wp-admin/admin-db.php near the top of xmlrpc.php. There is some assumption of implicitly included libraries, where the category_exists() function is used in post.php. This include fixes the problem but I'm not sure that's the correct way to solve it.

Daniel

  • Cc redsweater added
  • Keywords has-patch added; needs-patch removed

Patch to support mt_keywords as conveyance of WP native tags. (Second upload with small fix)

More importantly, I think we need a API call in XML-RPC for tags.

A dedicated API would probably be a good idea, especially if it gives more info (e.g. tell me all tags that have been used on this blog).

But seeing as some emphasis has been made on smoothing the transition for UTW users, I think this patch would be a good way to offer a blunt interface to the tags repository that matches the existing behavior of UTW (as I understand it, it will grab the mt_keywords of submitted posts, and ingest the items as tags).

This patch looks good in terms of functionality.

Pulling in an admin file in the includes feels wrong though.

The code elsewhere should be fixed instead.

  • Keywords developer-feedback added; has-patch removed
  • Milestone changed from 2.2 to 2.3

Does pushing this to 2.3 mean there will be no XML-RPC interface to getting/setting tags in 2.2?

  • Keywords has-patch commit added; developer-feedback removed
  • Milestone changed from 2.3 to 2.2

reviewing this further it looks like that new include is not actually needed as nowhere in post.php calls category_exists

I think this patch should go into 2.2 minus the extra include line.

  • Owner changed from anonymous to rob1n
  • Status changed from reopened to new

rob1n5 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [5278]) Add mt_keywords support. Props redsweater. fixes #900

Sweet!! Thanks for picking this up, rob1n.

  • Status changed from closed to reopened
  • Resolution fixed deleted

Apparently it breaks something.

comment:23 follow-up: ↓ 24   redsweater5 years ago

Bummer. Maybe the breakage can be documented here for posterity?

comment:24 in reply to: ↑ 23   westi5 years ago

Replying to redsweater:

Bummer. Maybe the breakage can be documented here for posterity?

Fatal error:  Call to undefined function get_post_tags() in
/home/peter/www/trunk/xmlrpc.php on line 1330

Fixed patch coming up

westi5 years ago

Fixed patch

  • Keywords commit removed
  • Milestone changed from 2.2 to 2.3

Tags are moving to 2.3.

  • Cc josephscott added

The new patch I've uploaded is based off the 900-fixed.diff. I fixed the error noted earlier and confirmed that tags can be set for new posts and are returned for existing posts.

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [5981]) mt_keywords support. Props westi and josephscott. fixes #900

Note: See TracTickets for help on using tickets.