getgrav / getgrav/grav-plugin-admin

theme yaml error affects whole system

Open
#1,056 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

If a simple error in the blueprints.yaml file of a theme occurs, the whole system is affected.
It would be better if an error in a single theme invalidates/causes an error condition for that theme, but does not affect the whole system.
How to reproduce bug:
Clean install a skeleton with two themes (actually only one is enough but two shows why this is a bigger issue), eg. Big-Picture.
Update/Install admin plugin. (updated to Grav v1.2.0 - Admin v1.3.1)
Go to admin page, create user, update etc.
Note the number of plugins (6 for me) and themes (2 for me)
In user/themes/big-picture/blueprints.yaml remove the space on first line between 'name:' & 'Big Picture' - this is a simple yaml error.
Refresh admin page.
Dash now shows number of plugins (0) and themes (0).
Hence the whole system is affected.
The error message in the plugins & themes pages is "The connection to the GPM cannot be established"
The error is unhelpful in that there is still a connection, but that there is an error in a configuration file.

When I tried to insert a similar error into a plugin, the debug response was correct and easy to find.

I came across this when developing a new theme by copying an existing one and changing the configuration. I didn't notice the error and was surprised to find the whole system had been affected. It took me a while to locate the error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.