htmlburger / wpemerge-theme

An organized, ES6 and SASS powered theme taking advantage of the WP Emerge framework. 🚀
https://wpemerge.com/
GNU General Public License v2.0
286 stars 33 forks source link

Upload release zip in WP admin panel #28

Closed Mick00 closed 4 years ago

Mick00 commented 5 years ago

Version

Expected behavior

To be able to upload the .zip directly into the theme section of the wp-admin

Actual behavior

Install fail, because it can't find the necessary files in the theme.zip like style.css, index.php and such. They should be at the root of the theme to enable this behaviour, but then the theme is not working, because of broken paths.

Steps to reproduce (in case of a bug)

  1. Execute yarn release
  2. Upload the resulting archive to a wordpress install
atanas-dev commented 5 years ago

Hi @Mick00 ,

This is most probably due to a bug causing the zip to be malformed (already fixed in master) but I'll take a look later today.

Mick00 commented 5 years ago

Yeah, saw that one and it is not the same thing. I made sure to pull changes and I can extract the zip and see correctly the files in the theme, so the archive should not be corrupted. If I upload the extracted theme through FTP it is working fine.

atanas-dev commented 5 years ago

Unfortunately the specific theme directory structure that the starter theme uses does not satisfy WordPress Core's validation when uploading it as a zip. More research pending.

anthonyvialleton commented 5 years ago

Any news about this bug ? This is really annoying for production purposes...

I tried to upload the my-theme/theme folder only as a .zip but it resulted as breaking WP admin panel.

Any workaround/manual steps to be able to import with the current state ??

The documentation is also missing for that part. It would be nice also to describe how to import the theme + plugins.

atanas-dev commented 5 years ago

@anthonyvialleton Currently the theme is not uploadable as a zip through the administration but you can manually upload it (FTP) or push it through Git if that's what your hosting uses (unless their have their own propitiatory validation that does not pass).

Fixing this is on the TODO list.

anthonyvialleton commented 5 years ago

Could we have more hint about this manual upload ? I don't know what was the good state of that .zip file generated before...

Was it simply uploading my-theme generated by yarn release into wp-content/themes/ ?!

No possible temporary workaround with the current version ??

Thanks a lot

Mick00 commented 5 years ago

Hi @anthonyvialleton,

There is currently no workaround if you absolutely want to upload via the theme menu in WP.

If you want to upload it to another server you can:

anthonyvialleton commented 5 years ago

@Mick00 Ok thanks

atanas-dev commented 4 years ago

Closing as this has been fixed in master for a while now and will be included in the next release.