-
Notifications
You must be signed in to change notification settings - Fork 3
Issue #5: Defensive defaults for servers that may not have write permissions. #6
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
Conversation
… have write permissions. Fixes backdrop-contrib#5.
|
This did not yet solve the error, it just changed slightly to "Error resolving vendor directory: public://vendor". I'm not sure if this is the best way, but it solved the problem for my setup and the new defaults as it provides the relative path "files/vendor" to the realpath function. A strange issue is still that on the settings page, the Composer directory appears with the real path (translated from public://) and is only created after settings are saved. (Maybe that would be also better for the vendor directory?) Just for info: I also tested the D7 version of the module and it produces a similar result when enabled: |
|
@AlexHoebart-ICPDR I wonder if we can change |
|
I tried using backdrop_realpath and it did not work, but I did not explore further why as I'm not much familiar with the bootstrap process. |
|
@AlexHoebart-ICPDR I've been letting this percolate in the back of my brain. Does this sound like it would work?
|
|
@AlexHoebart-ICPDR I've updated the PR here and tested locally -- it worked locally, but would love to have confirmation on your server that had the earlier problem. |
|
@laryn very nice, I tested this on my server and installation goes well without any errors. The composer and vendor directories are created in my files directory. One tiny issue, not sure if related: |
|
Thanks @AlexHoebart-ICPDR -- I have made another adjustment in the PR which moves the rebuild button to the top (unrelated to the issue but it just seems lost at the bottom if you have a larger number of libraries listed) and also sets the flag to try to ensure the file directory is writable when that button is added to the form. Does that solve the last tiny issue? Any other issues related to this? |
|
Super, I think this is perfect now! I tested the latest PR from scratch and everything goes smooth. I also then moved the directories in the shell and adjusted settings. All well. |
|
Great, thanks for your help! |
Fixes #5.