3

Using Focus Lab's Master Config, I've set a test global variable for production, like so:

$env_global['global_test'] = 'test';

Then in an embedded template I've dropped in {global_test}. Also tried it in a non-embedded template.

In both cases the output, regardless of environment, is this;

{global_test}

Am I missing something here?

| improve this question | | | | |
2

Angie,

I looked through our config code and what you've done should work. Can you confirm that you're editing the right environment file to be sure?

I'm reading this from my phone so when I get to my desk later I'll run a few tests to see what's up.

| improve this answer | | | | |
  • I'm at my phone too, I'll double check the environment file when I get a chance. Pretty sure it's the right one but I'll check again. – Angie Herrera Dec 2 '12 at 0:46
  • Question - does the GV have to be present on all of the environment files? That's the only way I got it to work. – Angie Herrera Dec 2 '12 at 3:04
  • No, the GV only needs to be in the appropriate environment file. I tested locally and got it working as expected so this leads me to believe you may have some streams crossed environment-wise. Can you share a gist/pastie/etc of the following: config.master.php, config.env.php & the environment you're working in? (Obviously feel free to remove any sensitive data you don't want to be shared). Also please share the root URL you're testing on. – Erik Reagan Dec 2 '12 at 13:16
  • Was most likely a host / server setup issue. Don't know what was going on with their previous server setup, but we got the site switched to something we have more control over and it's working as expected. Thanks! – Angie Herrera Jan 10 '13 at 4:23
2

I had this same issue yesterday and the facepalm moment was when I realized I had added my variable to config.dev.php when I should have added it to config.local.php.

Are you certain it's not a similar situation?

Perhaps double check the case statements in config.env.php to ensure the matching is working.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.