wp-cli / extension-command

Manages plugins and themes, including installs, activations, and updates.
MIT License
90 stars 79 forks source link

`wp theme list` reports wrong version for parent theme #309

Closed cpiber closed 2 years ago

cpiber commented 2 years ago

Bug Report

Describe the current, buggy behavior

Using wp theme list, it is possible to get a list of themes and their version. If a child-theme is used (possibly only when active), the output of the parent theme is wrong on the version field. This is probably related to wp_get_themes.

Describe how other contributors can replicate this bug

Actual:

+---------+--------+-----------+---------+
| name    | status | update    | version |
+---------+--------+-----------+---------+
| mik     | parent | available | 1.0.2   |
| website | active | none      | 1.0.2   |
+---------+--------+-----------+---------+

Describe what you would expect as the correct outcome

Expected:

+---------+--------+-----------+---------+
| name    | status | update    | version |
+---------+--------+-----------+---------+
| mik     | parent | available | 2.0.5   |
| website | active | none      | 1.0.2   |
+---------+--------+-----------+---------+

Let us know what environment you are running this on

OS: Linux 3.16.0-1160.41.1.vz7.183.5 #1 SMP Thu Sep 23 18:26:47 MSK 2021 x86_64
Shell:  /bin/bash
PHP binary: /opt/plesk/php/7.3/bin/php
PHP version:    7.3.20
php.ini used:   /opt/plesk/php/7.3/etc/php.ini
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.0.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
SQL modes:  
WP-CLI root dir:    phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:  phar://wp-cli.phar/vendor
WP_CLI phar path:   /var/www/vhosts/piber.at/web.piber.at
WP-CLI packages dir:    
WP-CLI global config:   
WP-CLI project config:  
WP-CLI version: 2.5.0
cpiber commented 2 years ago

Sorry, operator error