Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin can't be installed on Composer based sites where vendor folder is not public #550

Open
andergmartins opened this issue Aug 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@andergmartins
Copy link
Contributor

andergmartins commented Aug 15, 2022

Expected Behavior

Users should be able to install the plugin using composer, even on sites where the vendor folder is not public. That is actually a good practice, and we should not be incompatible with that.

One example of that are sites based on https://roots.io/bedrock/.

Current Behavior

Users actually can install the plugin using composer, but some features will break. The features that rely on assets files coming from the vendor folder, like:

  • the library wordpress-reviews
  • the library wordpress-version-notices
  • the Pro plugin requiring the free plugin as a composer requirement

Those asset files will not be found, because they are inside vendor, which is not public, so there is no public URL for it.

Those files (CSS, JS, images) will return 404 error.

Possible Solution

An option is to use/create a new library to handle those assets. The library could load the asset and store a public cache for them. CSS, JS, images, would be added to the wp-content folder, as a cache. The plugin and libraries would require a public endpoint that links to the library and returns the cached asset content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant