WPBP/WordPress-Plugin-Boilerplate-Powered

[BUG] Invalid Plugin being generated

Closed this issue · 5 comments

Describe the bug
Installation of a plugin generated by wpbp-generator without any changes in Wordpress Local fails with message "The package could not be installed. No valid plugins were found."

To Reproduce
Steps to reproduce the behavior:

  1. Generate JSON via wpbp-generator --json
  2. Generate Plugin source via wpbp-generator without any changes to JSON file
  3. cd into folder mynewplugin
  4. Generate Plugin zip via npm run plugin-zip
  5. Try to install generated mynewplugin.zip in Wordpress Local > WP Admin
  6. Installation in Wordpress Local fails with error mentioned above
  7. Manual copy of unzipped folder into wp-content/plugins has no effect

Expected behavior
The plugin should be installed and be shown in WP Admin > Plugins

Additional context
Happens on
MacOS Monterrey 12.4
Wordpress Local 6.4.2+6012
PHP v8.1.9 installed via Homebrew
NPM v8.14.0
node 16.7.0

Mte90 commented

You are right the zip doesn't contain a folder with all the content but just all the files and this is not valid in wordpress.
@erikyo what do you think?

Mte90 commented

I spotted the issue is on the generator, replace the Plugin Name string in the php root file.
I am working on a new generator version with the fix.

Mte90 commented

The new generator version fix that issue https://github.com/WPBP/generator/releases/tag/1.3.2

Thanks for the rapid fix, guys!

Mte90 commented