ClassicPress / Directory

ClassicPress Directory for plugins, themes, and code snippets powered by ClassicPress.
https://directory.classicpress.net
Other
4 stars 3 forks source link

Update Download Link button doesn't show an error if plugin/theme missing required headers #50

Closed viktorix closed 1 year ago

viktorix commented 1 year ago

While testing, I noticed that plugins that are missing required headers can still be updated with a success message: image

The PHP notice is logged, but it seems there are no error messages for the developer.

Notice: The new version is missing a Requires CP header. in public_html/wp-content/mu-plugins/download-links.php on line 357

We should display an error message when the developer clicks "Update Download Link" and reject an update. Otherwise, it may update to a new version with missing headers.

viktorix commented 1 year ago

For future reference: Checks are skipped if no new version is available in the frontend. WP-CLI forces checks, so it does show an error. Simone will add an error message if no new version is available to provide better feedback to the developer.

viktorix commented 1 year ago

Fixed in #51