plugin dir config value and install plugins that are in sub dirs #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had an issue with some plugins as in their respective repos they were stored in a sub directory.
Take Pixel & Tonic's Contact Form as an example. The actual plugin folder is in a sub directory and therefore didn't add properly.
I added a param to the
CRAFT_PLUGINS
section calledsubDirectory
(could probably do with a better name). When this is set to true it will move out the directory to avoid the above stated issue.This could be a whole lot more clever and actually test for the existence of the directory, therefore negating the need for a flag but this was simply a first pass to get around the issue in the short term.
During the process I also added
CRAFT_PLUGINS_DIRECTORY
option as it removed the need to have information repeated for every plugin. This also lead me to rename thepath
option todir
as then that made more sense after the other changes.Again, this was a relatively quick first pass. So there is plenty of room for improvement, but hopefully it, at bare minimum, highlight the issue I was trying to solve