What is Grav?

Grav is a really lightweight CMS written in PHP that gives you a possiblity to make websites based on Markdown files. Rightaway I thought this is something that I've been looking for many years. It's really pleasant in use and seems to be built with a performance in mind. But the documentation is not so good and sometime figuring out what's wrong is almost impossible without scanning its source code.

Obvious soulution

After updating grav to version 1.2.2 from some earlier version I encounter the problem with one of my plugins. I decided to delete it, but I didn't do it correctly, so the config file of the plugin prism-highligter was still there for a while. After a moment of research I realized that I have to delete the file prism-highlighter.yaml from the /user/config/plugins directory. When I did I thought it's all set up.

Unexpected results

What exactly was a problem? When the Grav was checking for updates it showed me an error, that "File is not found". Off course, I didn't see any result about what is not updated and what I should update. But the worse was that I cannot update anything either!

After couple hours of digging into source code (sic!) and some fun with copying and pasting I somehow managed the Grav to work correctly. But I don't know what was a reason. I know that the problem was withing /user/config/system.yaml file. Its content somehow force the cache to grab a prism-highlighter and partially take it out of its grave. The config of prism-highlighter was added to cache's files.

Here goes a problematic configuration:

absolute_urls: false
param_sep: ;
wrapped_site: false
reverse_proxy_setup: false
force_ssl: false
custom_base_url: 'http://local.devnote.com'
languages:
  supported:
    - en
  include_default_lang: true
  translations: false
  translations_fallback: true
  session_store_active: false
  http_accept_language: false
  override_locale: false
home:
  alias: /blog
  hide_in_urls: false
pages:
  theme: lingonberry
  order:
    by: default
    dir: asc
  list:
    count: 20
  dateformat:
    short: 'jS M Y'
    long: 'F jS \a\t g:ia'
  publish_dates: true
  process:
    markdown: true
    twig: false
  twig_first: false
  never_cache_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
  frontmatter:
    process_twig: false
    ignore_fields:
      - form
      - forms
cache:
  enabled: true
  check:
    method: file
  driver: auto
  prefix: g
  cli_compatibility: false
  lifetime: 604800
  gzip: true
  allow_webserver_gzip: false
twig:
  cache: true
  debug: true
  auto_reload: true
  autoescape: false
  undefined_functions: true
  undefined_filters: true
  umask_fix: false
assets:
  css_pipeline: false
  css_pipeline_include_externals: true
  css_pipeline_before_excludes: true
  css_minify: true
  css_minify_windows: false
  css_rewrite: true
  js_pipeline: false
  js_pipeline_include_externals: true
  js_pipeline_before_excludes: true
  js_minify: true
  enable_asset_timestamp: false
  collections:
    jquery: 'system://assets/jquery/jquery-2.x.min.js'
errors:
  display: '0'
  log: true
debugger:
  enabled: false
  shutdown:
    close_connection: true
images:
  default_image_quality: 85
  cache_all: false
  cache_perms: '0755'
  debug: false
  auto_fix_orientation: false
media:
  enable_media_timestamp: false
  upload_limit: 0
session:
  enabled: true
  timeout: 1800
  name: grav-site
  secure: false
  httponly: true
  split: true
gpm:
  releases: stable
  method: auto
  verify_peer: true

Real solution

If you encounter such a problem I advise you to copy all of your content under /user, but without /user/config. Then try to copy /user/config from a Grav's core default and then try to configurate your site settings again.

You may try to copy /user/config/plugins to save your plugins configuration, but I think in some cases it can cause troubles too.