infinum / eightshift-libs

Library that is meant to be used inside Eightshift Boilerplate and Eightshift Boilerplate Plugin libs via composer in order to be able to easily set up a modern development process.
https://eightshift.com
MIT License
61 stars 10 forks source link

Running use block command in multisite environment executes the command for the main theme #349

Closed dingo-d closed 11 months ago

dingo-d commented 1 year ago

Describe your bug

I have two themes in the multisite both using libs, when I run

wp boilerplate blocks use-block --name=carousel

The carousel block is added to the theme that is active on the main multisite blog, not the one I'm currently working on. The --url parameter didn't change the output.

Steps to Reproduce

  1. Have multisite with two themes using es libs
  2. Try to run the above command
  3. See the output...

Expected behavior

The block should be placed in the theme from where the command is called. That way the correct text domain would be copied over as well.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in this repo.

Yes

Please confirm that you have searched in our documentation and couldn't find the answer.

Yes

Please confirm that your bug occurs with all plugins uninstalled and with the default WordPress theme active.

Yes

iruzevic commented 11 months ago

This is tested and working, make sure your multiple themes have different command prefix 'boilerplate' and that you add the correct --url flag to the command.

example here https://eightshift.com/docs/basics/wp-cli#running-commands-in-multisite