New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible regression setting Global Variable values via Environment files? #1034

Robert-Black opened this Issue Oct 12, 2016 · 0 comments


None yet
2 participants

Robert-Black commented Oct 12, 2016

Expected behaviour

I’d like to set the value of a global variable with an Environment File, but I can no longer get it to work. {{dump}} shows that the current environment is correct (dev), but I can’t work out the right yaml. I thought I’d solved this a month ago (, but either I was wrong, or something’s regressed. It seems like only setting values can be changed via and Environment file, but not global variables?

    debug: true
        full: en_US
        name: English
    remote_asset_bootstrap: "/assets/cdn/"
    remote_asset_fontawesome: "/assets/cdn/"
    aca_cp_link: "/cp/dashboard"
    stanleys_open: true
    aca_login_link: /login
    aca_cp_link: "/cp/dashboard"

Actual behaviour

The value of aca_cp_link isn't changed. On Slack, Jason said this should work, but it doesn't

Steps to reproduce

  1. In content/globals/global.yaml set aca_cp_link: "wrong_value"
  2. set APP_ENV=dev in .env file
  3. create a dev.yaml file in site/settings/environments
  4. set the yaml to include…
    aca_cp_link: "right_value"

In templates, {{aca_cp_link}} now returns "wrong_value" instead of "right_value"

Server configuration

Operating system: macOS

Web server: Apache

PHP version: 5.5.29

Statamic version: 2.1.14

Updated from an older Statamic or fresh install: Fresh

List of installed addons: none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment