# Setting up a controller for ACF fields

**URL:** https://discourse.roots.io/t/setting-up-a-controller-for-acf-fields/11759
**Category:** sage
**Tags:** sage9
**Created:** 2018-02-28T17:43:07Z
**Posts:** 34
**Showing post:** 22 of 34

## Post 22 by @slam — 2018-03-16T07:21:59Z

I think I’ve solved this issue:

> [@Updating Controller to 2.0.0](https://discourse.roots.io/t/updating-controller-to-2-0-0/11806/14):
>
> Solved! Rename app/Controllers/app.php to app/controllers/App.php In composer.json replace line 31 with: "App\\": "app/", "App\\Controllers\\": "app/controllers/" As per this link at [soberwp](https://github.com/hambos22/sage-woo/commit/84aad57c3c2c6be7e8aaae8fbf2e9b4f32fa03cb). Run composer dump-autoload Run (optional?) yarn build These steps seemed to have solved my empty ACF and namespaced variables issue. I have no idea why; namespacing is a black art to me. Note 1: if you are working on a caps-insensitive system like OSX and pushing to a caps-senstive server …

---

_[View the full topic](https://discourse.roots.io/t/setting-up-a-controller-for-acf-fields/11759)._
