[wp-trac] [WordPress Trac] #43685: wp post meta missing options

WordPress Trac noreply at wordpress.org
Tue Apr 3 21:25:58 UTC 2018


#43685: wp post meta missing options
--------------------------+----------------------
 Reporter:  apb1963       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by ocean90):

 * status:  new => closed
 * focuses:  administration =>
 * version:  4.9.4 =>
 * milestone:  Awaiting Review =>
 * resolution:   => invalid


Old description:

> Not sure if this is the right place, however...
>
> The following command needs an option that eliminates the ASCII graphics,
> such as a --porcelain option, and/or --field option (singular).  Only
> --fields (plural) is valid and brings the graphics with it. --format=ids
> is also missing/broken.
>
> In short, in the following example, I need the output of the wp post meta
> list to be "168", without quotes - nothing more, nothing less.
>
> wp post meta list 203 --keys=_thumbnail_id --field=meta_value
> Error: Parameter errors:
>  unknown --field parameter
> Did you mean '--fields'?
>
> wp post meta list 203 --keys=_thumbnail_id --fields=meta_value
> +------------+
> | meta_value |
> +------------+
> | 168        |
> +------------+
>
> wp post meta list 203 --keys=_thumbnail_id --fields=meta_value
> --format=ids
> PHP Catchable fatal error:  Object of class stdClass could not be
> converted to string in phar:///data/local/bin/wp/php/WP_CLI/Formatter.php
> on line 139
> Catchable fatal error: Object of class stdClass could not be converted to
> string in phar:///data/local/bin/wp/php/WP_CLI/Formatter.php on line 139

New description:

 Not sure if this is the right place, however...

 The following command needs an option that eliminates the ASCII graphics,
 such as a --porcelain option, and/or --field option (singular).  Only
 --fields (plural) is valid and brings the graphics with it. --format=ids
 is also missing/broken.

 In short, in the following example, I need the output of the wp post meta
 list to be "168", without quotes - nothing more, nothing less.


 {{{
 wp post meta list 203 --keys=_thumbnail_id --field=meta_value
 Error: Parameter errors:
  unknown --field parameter
 Did you mean '--fields'?

 wp post meta list 203 --keys=_thumbnail_id --fields=meta_value
 +------------+
 | meta_value |
 +------------+
 | 168        |
 +------------+

 wp post meta list 203 --keys=_thumbnail_id --fields=meta_value
 --format=ids
 PHP Catchable fatal error:  Object of class stdClass could not be
 converted to string in phar:///data/local/bin/wp/php/WP_CLI/Formatter.php
 on line 139
 Catchable fatal error: Object of class stdClass could not be converted to
 string in phar:///data/local/bin/wp/php/WP_CLI/Formatter.php on line 139
 }}}

--

Comment:

 Hello @apb1963, welcome to WordPress Trac!

 This Trac is used for enhancements and bug reporting for the WordPress
 core software. For WP-CLI please take a look at http://wp-
 cli.org/#support. Thanks!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43685#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list