-
Notifications
You must be signed in to change notification settings - Fork 5
Remove composer from theme folder #35
Remove composer from theme folder #35
Conversation
added autoload to composer.json in project folder remved require autoload.php file from functions.php updated lock files for all.
This pull request doesn't remove the |
@mattKendon how should I test this code on the dev server? With other branches I have been switching to them:
Where |
Hi Chris, I don't have access to this repo, I don't think, so I created it from a fork under the outlandishideas.co.uk account. How would you like me to proceed? |
There is an outstanding invite for you to be a owner of the CoTech org on GitHub, you were originally invited by @Oskarino29, I think I have just resent it? |
@mattKendon if you visit this URL you should see a join link? https://github.com/cotech |
You could do this by adding the
|
@ floehopper I have done as you suggest locally but for the dev site I need to use unauthenticated HTTPS, so: git remote add outlandishideas https://github.com/outlandishideas/website.git
git fetch outlandishideas
remote: Counting objects: 10, done.
remote: Total 10 (delta 6), reused 6 (delta 6), pack-reused 4
Unpacking objects: 100% (10/10), done.
From https://github.com/outlandishideas/website
* [new branch] mapbox-api-access-token -> outlandishideas/mapbox-api-access-token
* [new branch] master -> outlandishideas/master
* [new branch] remove-composer-in-theme -> outlandishideas/remove-composer-in-theme
* [new branch] wp-4-7-5 -> outlandishideas/wp-4-7-5
git checkout --track -b outlandishideas/remove-composer-in-theme I then ran the update script and had these issues:
I did run |
@chriscroome: Hmm. What OS user is that update script run as? Does that user have write permission for the |
In general I imagine the user will need permission to write files and create directories under |
Odd, it isn't an ownership issue: ls -lah ~/ | grep \.git$
drwxr-xr-x 2 cotechdev cotechdev 4.0K Mar 10 13:25 .git But the directory was empty, so I created the directory:
And this seems to have solved the first issue, thanks @floehopper, but I still have this:
Perhaps this is related to the Node upgrade done on #29, the server is running this version:
Anyone have any suggestions regarding what to try next? |
Hmm. That is odd. As I imagine you realise, I doubt your fix is going to work if you want to checkout other remote branches in the future. Is the script definitely running its The subsequent error is outside my comfort zone. Did you try running |
It might be worth checking what happens if you switch back to the |
Do'h, no, I was running it in |
I'm not a Wordpress or Node expert, but I've just clicked around the dev website and it all seems to be working, so that sounds sensible to me. Are you expecting any visible changes from this pull request? BTW I'm around in Slack if you want to chat about anything. |
I have no idea what the implications are! If you are still about I'm in |
After merging this and then switching the dev site back to master and re-running the
Anyone have any suggestions? The line in question ( 'name' => Fields::FEATURED_IMAGE, |
@chriscroome: In the absence of any other suggestions, I would try the following:
This should reset the PHP packages to the ones specified in |
@floehopper thanks for the suggestion, it ran OK:
I'm not sure what you mean by ''"restart the web app"''? But this hasn't made a difference to the state of the dev site: |
How is the web app being served? I imagine you could just restart the relevant web server, e.g. Apache, Nginx, etc. |
As an aside, reading the description of this PR:
I think you could remove the 2nd |
Thanks @floehopper, I updated the #!/bin/bash
if [[ "${USER}" != "cotechdev" ]]; then
echo "This script should be run as cotechdev, please sudo first"
echo "sudo -u cotechdev -s /bin/bash"
echo "${0}"
exit
fi
cd /home/cotechdev/sites
git stash
git pull
rm -rf web/wp
composer install
cd web/app/themes/coop-tech-oowp-theme
#composer update
npm install
nodejs ./node_modules/gulp/bin/gulp.js
cd ../../..
wp core update-db And ran it:
But I'm afraid we have the same error:
|
@chriscroome: Did you try restarting Apache? Otherwise I'm all out of ideas. Sorry. |
@floehopper Apache has been restarted on that server a few times today, for other reasons, but in any case it won't make a difference to this problem. I think we had best wait for a developer to have some free time to help... |
I reinstalled the site from scratch on a different server and we still have the same error:
So I'm totally stuck and unable to fix this without help. |
@chriscroome Does changing the following line help at all?
I found that it got right of the error specified above, but I'm still getting a strange 404 which could be more related to my server settings than the project. |
@Oskarino29 which file are you suggesting I edit? |
|
By the "main project location" I guessed you meant the root one -- I found 58 After editing that file as suggested I ran:
And that fixed this dev site so I'll merge your two pull requests and update the main dev site. |
composer.json
in project folder. Removed them from themecomposer.json
.composer.json
in project folder. Removed them from themecomposer.json
.require ./vendor/autoload.php
file fromweb/app/themes/<theme>/functions.php
.composer.json
files.This removes the unnecessary
composer install
from within the theme folder. Thatcomposer.json
was not being used, and was hindering development for people unaware that acomposer install
was required in the theme folder.