The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 1 (near "@extends:")

On /admin/tools/reports Grav Yaml Linter reports issues and for each admin .yaml file that uses @extends I got this error:

The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 1 (near "@extends:").

I am not a specialist of YAML and I don’t know if this is an issue with the linter or my YAML syntax.

I found that @ should be replaced by ~ in the new YAML syntax. Not sure if that applies here, I did try anyway : the linting error was gone, but as was the effect of my .yaml file on its admin form.

Versions: Grav v1.6.11 - Admin v1.9.7

Hi @ontime, I am no expert in this area but in the past I’ve used single quotes to fix this, for example:

'@extends':

Does that work for you?

@paulhibbitts it worked thank you:
The linting error is gone and the yaml file containing the include still works.

Maybe the Grav documentation should be adapted accordingly?

1 Like