Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Remove composer from theme folder #35

Merged

Conversation

mattKendon
Copy link
Contributor

  • Added dev requirements to composer.json in project folder. Removed them from theme composer.json.
  • Added autoload to composer.json in project folder. Removed them from theme composer.json.
  • Removed require ./vendor/autoload.php file from web/app/themes/<theme>/functions.php.
  • updated lock files for both composer.json files.

This removes the unnecessary composer install from within the theme folder. That composer.json was not being used, and was hindering development for people unaware that a composer install was required in the theme folder.

added autoload to composer.json in project folder
remved require autoload.php file from functions.php
updated lock files for all.
@mattKendon
Copy link
Contributor Author

This pull request doesn't remove the composer.json file from the theme folder at this time in order to not cause issues with the current deployment process where composer install is called in the theme folder. However, that file is functionally useless, and the functions.php file no longer requires the vendor/autoload.php file as stated above.

@chriscroome
Copy link
Member

@mattKendon how should I test this code on the dev server? With other branches I have been switching to them:

su - cotechdev -s /bin/bash
cd sites
git pull
git checkout wp-4-7-5
update

Where update is generated from this template, but with this pull request there doesn't appear to be a branch in this repo?

@mattKendon
Copy link
Contributor Author

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?

@chriscroome
Copy link
Member

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?

@chriscroome
Copy link
Member

@mattKendon if you visit this URL you should see a join link? https://github.com/cotech

@floehopper
Copy link
Contributor

@chriscroome:

how should I test this code on the dev server? With other branches I have been switching to them

You could do this by adding the outlandishideas remote and checking out the remove-composer-in-theme remote branch:

$ git remote add outlandishideas [email protected]:outlandishideas/website.git
$ git fetch outlandishideas
$ git checkout --track -b outlandishideas/remove-composer-in-theme

@chriscroome
Copy link
Member

@ 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:

error: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': Unable to create '/home/cotechdev/sites/.git/refs/heads/outlandishideas/remove-composer-in-theme.lock': Permission denied

[14:07:19] Error: Missing binding /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/vendor/linux-x64-48/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
    at module.exports (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/laravel-elixir/node_modules/gulp-sass/index.js:187:21)
[14:07:19] 'all' errored after 164 ms
[14:07:19] Error in plugin 'run-sequence(sass)'
Message:
    Missing binding /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/vendor/linux-x64-48/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
Stack:
Error: Missing binding /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/vendor/linux-x64-48/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
    at module.exports (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/laravel-elixir/node_modules/gulp-sass/index.js:187:21)
Success: WordPress database already at latest db version 38590.

I did run npm rebuild node-sass and still got the above... any suggestions? This on on dev.coops.tech.

@floehopper
Copy link
Contributor

@chriscroome: Hmm. What OS user is that update script run as? Does that user have write permission for the /home/cotechdev/sites/.git/refs/heads/outlandishideas directory? The first error message suggests a permission problem creating a file remove-composer-in-theme.lock in that directory.

@floehopper
Copy link
Contributor

In general I imagine the user will need permission to write files and create directories under /home/cotechdev/sites/.git, i.e. the local git repository directory.

@chriscroome
Copy link
Member

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:

mkdir -p /home/cotechdev/sites/.git/refs/heads/outlandishideas/

And this seems to have solved the first issue, thanks @floehopper, but I still have this:

[15:00:21] 'sass' errored after 166 ms
[15:00:21] Error: Missing binding /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/vendor/linux-x64-48/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
    at module.exports (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/laravel-elixir/node_modules/gulp-sass/index.js:187:21)
[15:00:21] 'all' errored after 174 ms
[15:00:21] Error in plugin 'run-sequence(sass)'
Message:
    Missing binding /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/vendor/linux-x64-48/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
Stack:
Error: Missing binding /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/vendor/linux-x64-48/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
    at module.exports (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/node_modules/laravel-elixir/node_modules/gulp-sass/index.js:187:21)
Success: WordPress database already at latest db version 38590.

Perhaps this is related to the Node upgrade done on #29, the server is running this version:

npm -v
3.10.10

Anyone have any suggestions regarding what to try next?

@floehopper
Copy link
Contributor

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:

mkdir -p /home/cotechdev/sites/.git/refs/heads/outlandishideas/

And this seems to have solved the first issue

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 git commands as the cotechdev user? It would be useful to know what the output of the git status command is in the /home/cotechdev/sites/ directory in case the repo has been left in an inconsistent state.

The subsequent error is outside my comfort zone. Did you try running npm rebuild node-sass (presumably in the /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme directory) as suggested by the error message?

@floehopper
Copy link
Contributor

It might be worth checking what happens if you switch back to the master branch using git checkout master and try running the update script on that to see whether the problem is related to the branch from the pull request or not. You should be able to switch back to that branch using git checkout outlandishideas/remove-composer-in-theme.

@chriscroome
Copy link
Member

chriscroome commented Jun 8, 2017

Did you try running npm rebuild node-sass (presumably in the /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme directory) as suggested by the error message?

Do'h, no, I was running it in ~/, now the error has gone away, next we need to check that the dev site is OK after this update and we can merge this pull request and then update the live site -- does that sound like a plan?

@floehopper
Copy link
Contributor

next we need to check that the dev site is OK after this update and we can merge this pull request and then update the live site -- does that sound like a plan?

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.

@chriscroome
Copy link
Member

Are you expecting any visible changes from this pull request?

I have no idea what the implications are!

If you are still about I'm in #onlineplatform

@chriscroome chriscroome merged commit 7055f91 into cotech:master Jun 8, 2017
@chriscroome
Copy link
Member

chriscroome commented Jun 8, 2017

After merging this and then switching the dev site back to master and re-running the update script things looked fine from the command line interface but the site doesn't look so great:

Fatal error: Uncaught Error: Class 'Outlandish\MappingCoTech\Fields\Fields' not found in 
  /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php:14
Stack trace:
#0 /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/loader.php(11): require_once()
#1 /home/cotechdev/sites/web/wp/wp-includes/class-wp-hook.php(298): load_acf('')
#2 /home/cotechdev/sites/web/wp/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#3 /home/cotechdev/sites/web/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /home/cotechdev/sites/web/wp/wp-settings.php(449): do_action('init')
#5 /home/cotechdev/sites/web/wp-config.php(9): require_once('/home/cotechdev...')
#6 /home/cotechdev/sites/web/wp/wp-load.php(42): require_once('/home/cotechdev...')
#7 /home/cotechdev/sites/web/wp/wp-blog-header.php(13): require_once('/home/cotechdev...')
#8 /home/cotechdev/sites/web/index.php(5): require('/home/cotechdev...')
#9 {main} thrown in /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php on line 14

Anyone have any suggestions?

The line in question (/home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php line 14):

                'name' => Fields::FEATURED_IMAGE,

@floehopper
Copy link
Contributor

@chriscroome: In the absence of any other suggestions, I would try the following:

$ cd /home/cotechdev/sites
$ git checkout .
$ composer install

This should reset the PHP packages to the ones specified in composer.lock in the git repo. You will also probably need to restart the web app, but do not run the update script.

@chriscroome
Copy link
Member

@floehopper thanks for the suggestion, it ran OK:

composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
  - Removing johnpbloch/wordpress-core (4.7.5)
  - Installing johnpbloch/wordpress-core (4.7.4)
    Downloading: 100%         

  - Removing johnpbloch/wordpress (4.7.5)
  - Installing johnpbloch/wordpress (4.7.4)
    Downloading: 100%         

  - Removing phpdocumentor/reflection-docblock (2.0.5)
  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Loading from cache

  - Removing symfony/class-loader (v2.8.22)
  - Installing symfony/class-loader (v2.8.20)
    Loading from cache

  - Removing symfony/filesystem (v2.8.22)
  - Installing symfony/filesystem (v2.8.20)
    Loading from cache

  - Removing symfony/config (v2.8.22)
  - Installing symfony/config (v2.8.20)
    Loading from cache

  - Removing symfony/debug (v2.8.22)
  - Installing symfony/debug (v2.8.20)
    Loading from cache

  - Removing symfony/console (v2.8.22)
  - Installing symfony/console (v2.8.20)
    Loading from cache

  - Removing symfony/css-selector (v2.8.22)
  - Installing symfony/css-selector (v2.8.20)
    Loading from cache

  - Removing symfony/dependency-injection (v2.8.22)
  - Installing symfony/dependency-injection (v2.8.20)
    Loading from cache

  - Removing symfony/event-dispatcher (v2.8.22)
  - Installing symfony/event-dispatcher (v2.8.20)
    Loading from cache

  - Removing symfony/translation (v2.8.22)
  - Installing symfony/translation (v2.8.20)
    Loading from cache

  - Removing symfony/yaml (v2.8.22)
  - Installing symfony/yaml (v2.8.20)
    Loading from cache

Generating autoload files

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:

@floehopper
Copy link
Contributor

floehopper commented Jun 13, 2017

@chriscroome:

I'm not sure what you mean by ''"restart the web app"''?

How is the web app being served? I imagine you could just restart the relevant web server, e.g. Apache, Nginx, etc.

@floehopper
Copy link
Contributor

As an aside, reading the description of this PR:

This removes the unnecessary composer install from within the theme folder. That composer.json was not being used, and was hindering development for people unaware that a composer install was required in the theme folder.

I think you could remove the 2nd composer update from the update script, i.e. the one in the theme folder. Also I think the first one should be composer install not composer update. I might be wrong, but I think we'd only want to run composer update locally to update the composer.lock file in the git repo.

@chriscroome
Copy link
Member

Thanks @floehopper, I updated the update script on the dev site to:

#!/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:

update
No local changes to save
Already up-to-date.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
  - Installing johnpbloch/wordpress-core (4.7.4)
    Loading from cache

Generating autoload files
[12:23:14] Using gulpfile ~/sites/web/app/themes/coop-tech-oowp-theme/gulpfile.js
[12:23:14] Starting 'all'...
[12:23:14] Starting 'sass'...
[12:23:16] Finished 'sass' after 2.74 s
[12:23:16] Starting 'scripts'...
[12:23:17] Finished 'scripts' after 221 ms
[12:23:17] Starting 'scripts'...
[12:23:17] Finished 'scripts' after 13 ms
[12:23:17] Starting 'copy'...
[12:23:17] Finished 'copy' after 182 ms
[12:23:17] Starting 'copy'...
[12:23:17] Finished 'copy' after 13 ms
[12:23:17] Starting 'copy'...
[12:23:17] Finished 'copy' after 46 ms
[12:23:17] Starting 'copy'...
[12:23:17] Finished 'copy' after 326 ms
[12:23:17] Starting 'copy'...
[12:23:17] Finished 'copy' after 19 ms
[12:23:17] Finished 'all' after 3.58 s
[12:23:17] Starting 'default'...
┌───────────────┬──────────────────────────┬─────────────────────────────────────────────────────┬───────────────────────────────┐
│ Task          │ Summary                  │ Source Files                                        │ Destination                   │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.sass()    │ 1. Compiling Sass        │ assets/scss/app.scss                                │ public/css/app.css            │
│               │ 2. Autoprefixing CSS     │                                                     │                               │
│               │ 3. Concatenating Files   │                                                     │                               │
│               │ 4. Writing Source Maps   │                                                     │                               │
│               │ 5. Saving to Destination │                                                     │                               │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.scripts() │ 1. Concatenating Files   │ node_modules/jquery/dist/jquery.js                  │ public/js/vendor.js           │
│               │ 2. Writing Source Maps   │ node_modules/leaflet/dist/leaflet.js                │                               │
│               │ 3. Saving to Destination │ node_modules/what-input/dist/what-input.js          │                               │
│               │                          │ node_modules/foundation-sites/dist/foundation.js    │                               │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.scripts() │ 1. Concatenating Files   │ assets/js/app.js                                    │ public/js/app.js              │
│               │ 2. Writing Source Maps   │                                                     │                               │
│               │ 3. Saving to Destination │                                                     │                               │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.copy()    │ 1. Saving to Destination │ assets/img/**/*                                     │ public/img/                   │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.copy()    │ 1. Saving to Destination │ node_modules/leaflet/dist/images/**/*               │ public/css/images/            │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.copy()    │ 1. Saving to Destination │ assets/fonts/**/*                                   │ public/fonts/                 │
│               │                          │ node_modules/font-awesome/fonts/**/*                │                               │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.copy()    │ 1. Saving to Destination │ node_modules/foundation-icons/svgs/**/*             │ public/foundation-icons/svgs/ │
├───────────────┼──────────────────────────┼─────────────────────────────────────────────────────┼───────────────────────────────┤
│ mix.copy()    │ 1. Saving to Destination │ node_modules/foundation-icons/foundation-icons.css  │ public/foundation-icons/      │
│               │                          │ node_modules/foundation-icons/foundation-icons.eot  │                               │
│               │                          │ node_modules/foundation-icons/foundation-icons.scss │                               │
│               │                          │ node_modules/foundation-icons/foundation-icons.svg  │                               │
│               │                          │ node_modules/foundation-icons/foundation-icons.ttf  │                               │
│               │                          │ node_modules/foundation-icons/foundation-icons.woff │                               │
└───────────────┴──────────────────────────┴─────────────────────────────────────────────────────┴───────────────────────────────┘
[12:23:17] Finished 'default' after 13 ms
Success: WordPress database already at latest db version 38590.

But I'm afraid we have the same error:

Fatal error: Uncaught Error: Class 'Outlandish\MappingCoTech\Fields\Fields' not found in /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php:14 Stack trace:
#0 /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/loader.php(11): require_once()
#1 /home/cotechdev/sites/web/wp/wp-includes/class-wp-hook.php(298): load_acf('')
#2 /home/cotechdev/sites/web/wp/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#3 /home/cotechdev/sites/web/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /home/cotechdev/sites/web/wp/wp-settings.php(449): do_action('init')
#5 /home/cotechdev/sites/web/wp-config.php(9): require_once('/home/cotechdev...')
#6 /home/cotechdev/sites/web/wp/wp-load.php(42): require_once('/home/cotechdev...')
#7 /home/cotechdev/sites/web/wp/wp-blog-header.php(13): require_once('/home/cotechdev...')
#8 /home/cotechdev/sites/web/index.php(5): require('/home/cotechdev...')
#9 {main} thrown in /home/cotechdev/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php on line 14

@floehopper
Copy link
Contributor

@chriscroome: Did you try restarting Apache? Otherwise I'm all out of ideas. Sorry.

@chriscroome
Copy link
Member

@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...

@chriscroome
Copy link
Member

chriscroome commented Jun 16, 2017

I reinstalled the site from scratch on a different server and we still have the same error:

Fatal error: Uncaught Error: Class 'Outlandish\MappingCoTech\Fields\Fields' not found in /home/cotechdev2/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php:14 Stack trace: 
#0 /home/cotechdev2/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/loader.php(11): require_once() 
#1 /home/cotechdev2/sites/web/wp/wp-includes/class-wp-hook.php(298): load_acf('') 
#2 /home/cotechdev2/sites/web/wp/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) 
#3 /home/cotechdev2/sites/web/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array) 
#4 /home/cotechdev2/sites/web/wp/wp-settings.php(449): do_action('init') 
#5 /home/cotechdev2/sites/web/wp-config.php(9): require_once('/home/cotechdev...') 
#6 /home/cotechdev2/sites/web/wp/wp-load.php(42): require_once('/home/cotechdev...') 
#7 /home/cotechdev2/sites/web/wp/wp-blog-header.php(13): require_once('/home/cotechdev...') 
#8 /home/cotechdev2/sites/web/index.php(5): require('/home/cotechdev...') 
#9 {main} thrown in /home/cotechdev2/sites/web/app/themes/coop-tech-oowp-theme/inc/acf/client.php on line 14

So I'm totally stuck and unable to fix this without help.

@Oskarino29
Copy link
Collaborator

Oskarino29 commented Jun 19, 2017

@chriscroome Does changing the following line help at all?

  "autoload": {
    "psr-4": {
      "Outlandish\\MappingCoTech\\": "web/app/themes/coop-tech-oowp-theme/src/"
    }
  },

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.

@chriscroome
Copy link
Member

@Oskarino29 which file are you suggesting I edit?

@Oskarino29
Copy link
Collaborator

composer.json in main project location, line 74

@chriscroome
Copy link
Member

By the "main project location" I guessed you meant the root one -- I found 58 composer.json files in total...

After editing that file as suggested I ran:

composer update
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 that fixed this dev site so I'll merge your two pull requests and update the main dev site.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants