Error since upgrading to 1.07

Since upgrading to 1.07 I get an error when I go to the Configuration tab in the Admin plugin:

Twig_Error_Runtime
COPY
An exception has been thrown during the rendering of a template (“Argument 1 passed to Grav\Common\Data\Data::__construct() must be of the type array, null given, called in /Applications/MAMP/htdocs/grav-blog/user/plugins/admin/classes/admin.p hp on line 343 and defined”) in “config.html.twig” at line 46.

Not sure what I need to do to fix this, other than roll back to 1.0.6

Thanks.

Jeremy

Sounds like you have some bad configuration. Can you provide a paste of your /user/config/system.yaml file?

Sure:

absolute_urls: false
timezone: Europe/Vatican
param_sep: ‘:‘
wrapped_site: false
languages:
include_default_lang: true
translations: true
translations_fallback: true
session_store_active: false
http_accept_language: false
override_locale: false
home:
alias: /home
pages:
theme: mytheme
order:
by: default
dir: asc
list:
count: 20
dateformat:
short: ‘jS M Y’
long: ‘F jS \a g:ia’
publish_dates: true
process:
markdown: true
twig: false
events:
page: true
twig: true
markdown:
extra: true
auto_line_breaks: false
auto_url_links: false
escape_markup: false
special_chars:
’>’: gt
’<’: lt
types:
- txt
- xml
- html
- htm
- json
- rss
- atom
expires: 604800
last_modified: false
etag: false
vary_accept_encoding: false
redirect_default_route: false
redirect_default_code: '301’
redirect_trailing_slash: true
ignore_files:
- .DS_Store
ignore_folders:
- .git
- .idea
ignore_hidden: true
url_taxonomy_filters: true
markdown_extra: false

cache:
enabled: true
check:
method: file
driver: auto
prefix: ‘g’

twig:
cache: true
debug: true
auto_reload: true
autoescape: false

assets:
css_pipeline: false
css_minify: true
css_rewrite: true
js_pipeline: false
js_minify: true

Hmm. can you paste that into a code block? click the “?” icon in the input box. can’t tell from this paste without indents.

Sorry. Didn’t know about code blocks.

absolute_urls: false
timezone: Europe/Vatican
param_sep: ':'
wrapped_site: false
languages:
  include_default_lang: true
  translations: true
  translations_fallback: true
  session_store_active: false
  http_accept_language: false
  override_locale: false
home:
  alias: /home
pages:
  theme: mytheme
  order:
    by: default
    dir: asc
  list: 
    count: 20
  dateformat:
    short: 'jS M Y'
    long: 'F jS \a   g:ia'
  publish_dates: true
  process:
    markdown: true
    twig: false
  events:
    page: true
    twig: true
  markdown:
    extra: true
    auto_line_breaks: false
    auto_url_links: false
    escape_markup: false
    special_chars:
      '>': gt
      '<': lt
  types:
    - txt
    - xml
    - html
    - htm
    - json
    - rss
    - atom
  expires: 604800
  last_modified: false
  etag: false
  vary_accept_encoding: false
  redirect_default_route: false
  redirect_default_code: '301'
  redirect_trailing_slash: true
  ignore_files:
    - .DS_Store
  ignore_folders:
    - .git
    - .idea
  ignore_hidden: true
  url_taxonomy_filters: true
  markdown_extra: false

cache:
  enabled: true
  check:
    method: file
  driver: auto
  prefix: 'g'

twig:
  cache: true
  debug: true
  auto_reload: true
  autoescape: false

assets:
  css_pipeline: false
  css_minify: true
  css_rewrite: true
  js_pipeline: false
  js_minify: true
---

Do not get such error… is Grav core updated too? If the answer is yes, can you PM me the zip of your user folder via Gitter? (you can delete accounts/ and data/ if they contain sensitive information)

Yes, grav core is updated too.

I think I managed to upload the zip file. Not sure.

But I cannot be the only one confused by the different system.yaml files in various places, and which one takes precedence over the others. I will reread the docs, but it would be helpful if there were a clearer explanation.

Thanks

There is usually just one system.yaml you need to care about, it’s /user/config/system.yaml. It contains your edits, and the Admin configuration saves there by default.

The system/config/system.yaml is the core default configuration, you should never change that as updates overwrite it, and it’s the lower precedence file.

Then there are other advanced configurations you can have, but this is the most common scenario.

Thanks. I don’t think I made any changes to the system/config/system.yaml file but it is possible that I did.

Would it be worthwhile me downloading a fresh version of just that file and trying again?

I just checked, and the system/config/system.yaml file is the one I downloaded yesterday afternoon with the core update. No changes.

Do you have any extra environment configs? These are not setup by default, but you might of created a localhost folder or something, so you could have a localhost/config/system.yaml file. This could relate to the issue too.

@jeremyc Flavio shared the zip with me so I took a look. The error is caused by an extra temp file: user/config/system.yaml~ that must of been generated and left while you edited in VI or Emacs or something. If you delete this file, the error goes away.

I also created an issue for this so we can fix it going forward: https://github.com/getgrav/grav/issues/601

Many thanks for finding that. It is a backup left by BBEDIT. I suppose as I am using Git I don’t really need to save those backups. I’ll amend my preferences going forward.