Gateway theme: Months_of_the_year

I’ve read this issue, but I am still unable to resolve this.

I have a Grav website running a clean install of the Gateway skeleton. The skeleton comes with directory system/languages that contains the standard languages files, including en.yaml, which contains:

  MONTHS_OF_THE_YEAR: ['January', 'February',  …]

However, the blogpost sample pages display the date like this: “MONTHS_OF_THE_YEAR[5] 27, 2014” - so it is obviously not picking up this array with the actual names of the month from en.yaml.

It looks like the problem is specific to Gateway. If I copy the blog pages from Gateway to the default Quark theme, dates display correctly, with the name of the month appearing.

It is a bug in the Gateway theme.

Its fixed in this GitHub pull requst.

@gisle, The pull request from Aug '19 has however not been merged yet…

So for the time being, you will have to fix it yourself. You have 2 options:

  1. Create file ‘/user/languages/en.yaml’ and add the following line:

    MONTHS_OF_THE_YEAR: [January, February, March, April, May, June, July, August, September, October, November, December]
  2. Or, apply the suggested fix in the pull request yourself in ‘/user/themes/gateway/templates/partials/blog-item.html.twig’ by replacing ‘MONTHS_OF_THE_YEAR’ with ‘GRAV.MONTHS_OF_THE_YEAR’.

    Note: If you make any changes to a downloaded theme, please be advised that customisations will be lost when updating the theme. Best to use an inherited/child theme and apply changes to the child.

Btw I have updated the post you’re referring to and corrected the ‘/usr’ typo’s into ‘/user’