WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#900 closed enhancement (fixed)

support of mt_keywords

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

Description

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

Attachments (4)

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

Download all attachments as: .zip

Change History (32)

comment:2 anonymousbugger9 years ago

  • Patch set to No

comment:3 anonymousbugger9 years ago

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

comment:4 michel v9 years ago

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

comment:5 markjaquith8 years ago

  • Keywords bg|needs-patch added
  • Milestone set to 2.1
  • Priority changed from normal to low

comment:6 mdawaffe8 years ago

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

#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.

comment:7 redsweater7 years ago

  • Milestone changed from 2.1 to 2.2
  • Resolution wontfix deleted
  • Status changed from closed to reopened
  • Version changed from 1.5 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

comment:8 rob1n7 years ago

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

comment:9 rob1n7 years ago

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

comment:10 redsweater7 years ago

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

comment:11 redsweater7 years ago

  • Cc redsweater added

comment:12 redsweater7 years ago

  • Keywords has-patch added; needs-patch removed

redsweater7 years ago

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

comment:13 matt7 years ago

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

comment:14 redsweater7 years ago

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).

comment:15 westi7 years ago

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.

comment:16 foolswisdom7 years ago

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

comment:17 redsweater7 years ago

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

comment:18 westi7 years ago

  • 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.

comment:19 rob1n7 years ago

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

rob1n7 years ago

comment:20 rob1n7 years ago

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

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

comment:21 redsweater7 years ago

Sweet!! Thanks for picking this up, rob1n.

comment:22 rob1n7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Apparently it breaks something.

comment:23 follow-up: redsweater7 years ago

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

comment:24 in reply to: ↑ 23 westi7 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

westi7 years ago

Fixed patch

comment:25 rob1n7 years ago

  • Keywords commit removed
  • Milestone changed from 2.2 to 2.3

Tags are moving to 2.3.

comment:26 josephscott7 years ago

  • Cc josephscott added

josephscott7 years ago

comment:27 josephscott7 years ago

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.

comment:28 ryan7 years ago

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

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

Note: See TracTickets for help on using tickets.