[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:
- Generate JSON via
wpbp-generator --json
- Generate Plugin source via
wpbp-generator
without any changes to JSON file - cd into folder mynewplugin
- Generate Plugin zip via
npm run plugin-zip
- Try to install generated mynewplugin.zip in Wordpress Local > WP Admin
- Installation in Wordpress Local fails with error mentioned above
- 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
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?
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.
The new generator version fix that issue https://github.com/WPBP/generator/releases/tag/1.3.2
Thanks for the rapid fix, guys!