I'm having the same issue as described below, however can't find a solution:
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?
source: (Why wouldn't global variable parse correctly with Master Config?)
In addition, these standard Focus Labs global variables don't work either: {global:env} {global:env_full}
I don't think it's caused by my server environment, as I have a 2nd separate site (EE 2.6.1) where it works fine, and I've tested on localhost and stage.mydomain.com
I'm guessing it's caused by a conflict with an Add-on... I'm using a long list including Stash, CE String, CE Image, Store, Low Variables, Matrix, Assets, Wygwam, Freeform, User, Taxonomy...
My site is running EE 2.6.1
Has anyone else come across and solved this issue before?
I'd be grateful for some guidance.
Many Thanks
EDIT:
Ok. I've figured out one problem...
I'd used the two standard Focus Labs variables {global:env} and {global:env_full} in an early parsed Low Variable. I guess the reason they weren't parsing has to do with parse order. They work fine, if added directly into a template.
That still leaves me struggling to set my own custom variable in config.local.php
This doesn't work:
$env_global['global:google_analytics'] = 'UA-XXXXXXX-XX';
Whereas this does:
global $assign_to_config; $assign_to_config['global_vars'] = array('global:google_analytics' => 'UA-XXXXXXX-XX');