Grav 1.7 Yamllinter does not detect failing translation files

I have updated my starter theme that I use as a base for new websites to Grav 1.7. Everythink works, it took a while to understand that I had to escape every {{ content }} with |raw as even enabling twig compatibility or disabling autoescape variables didn’t seem to make a difference. So now I have blueprint and twig compatibility disabled and everything works, but if I disable yaml compatibility I get an exception: “Failed to read en.yaml: Duplicate key “OUTOFSTOCK” detected at line 57 (near “OUTOFSTOCK: “Out of Stock””).”
Yaml linter is not reporting any error, both on the admin and with CLI.
How can I check to see if my old yaml files are correct, where do I check the syntax?

@filo91, It seems Admin is only running Yamllinter with default settings. Also, command $ bin/grav yamllinter does not check yaml files in e.g. translations folders.

The following command will recurse the entire Grav folder tree including any translations folder:

$ bin/grav yamllinter --all

Awesome, thank you for the suggestion. I wish that was included in the documentation.

I actually found an issue with the plugin SEO, the language files had a duplicate key. It hasn’t been updated in 2 years, so I guess they’ll not change it soon. Fixed it and everything works without compatibility turned off.

@filo91, There still seems to be some activity of the owner…

Also, a Pull Request has been issued on 2021/02/22, to fix the issue.
You might want to subscribe to the PR to get notified of its progress.

1 Like

Thanks, that’s great I didn’t see that.