Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display warning in theme list info if theme version is higher than expected #175

Open
wonderWomantotheResue opened this issue May 2, 2019 · 4 comments

Comments

@wonderWomantotheResue
Copy link

Here's what I'm experiencing with wp cli v2.2.0 release 4/26. upon using wp theme list, I now see an error message next to themes by Elegant: MyResume, Minimal, Glow, and BlueSky. I see this:
versionhigherthanexpected

BlueSky | inactive | version higher than expected | 5.0.12 | network

this error message is a false positive. The Elegant theme Blue sky is on current level today, 5.0.12 and does not need updating. Yet, wp cli thinks it needs updating. It happens with 4 of the Elegant themes we have installed on multi site. Something is out of sync. Plus the legend for the new version of wp theme status does not include U -update Available.

themeStatus_Legend

However, regarding the legend missing the definition for U -update Available seems to be appear as expected today. It looks like it was fixed. I just ran wp theme status today and the U = Update Available now exists.

@swissspidy
Copy link
Member

WP-CLI checks WordPress.org for the current version of each theme in the list.

The thing is, there are some themes on WordPress.org with the same name as the ones you have installed.

For example, for BlueSky it will get version 1.0 from here: https://wordpress.org/themes/bluesky/
For Glow, it will get 1.0.6 from here: https://wordpress.org/themes/glow/
For Minimal, it will get 1.0.1 from here: https://wordpress.org/themes/minimal/

I'd say the issue is that Elegant Themes does not filter the API results to point to their own servers.

Not sure if we can really do something here.

@wonderWomantotheResue
Copy link
Author

Thank you for the information. I just would like to confirm that this is the reason this message appears after updating to wp cli v2.2.0. These themes have been on and used on our systems since 2013 without this message ever appearing before. Additionally, Elegant Themes informs me that if the same error message doesn't appear in the WP interface next to the theme, then it is an issue with wp cli.

@swissspidy
Copy link
Member

Well, WordPress itself does not do any such checks. If your version is higher than expected, WordPress just ignores it. That's why you don't see this in the WordPress interface. This is a feature specific to WP-CLI.

If you could provide us with a copy of one of those themes, we could have a look at the source code to see how they handle their update checks and stuff, and maybe give Elegant Themes some guidance on how to fix this on their end.

But otherwise, this is a feature of WP-CLI, and it is working as expected. It's just an unfortunate case where WordPress.org offers themes with the same name. So unless we find another way of doing these version checks, I'd say there's nothing we can do here.

@wonderWomantotheResue
Copy link
Author

wonderWomantotheResue commented May 21, 2019

I sent the theme to your private message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants