Replies: 5 comments 3 replies
-
Totally agree that it would be good to sort out this issue somehow. Especially to help with this: "user frustration when an installed theme doesn't work". The themes are presented in a way that suggests they are there to be used, and the first one on the list doesn't work, so new users inevitably think they have done something wrong and ask about it on the forum. This wastes everyone's time. My simplest suggestion would be to add a line at the top of the theme page to alert users that some themes may be out of date. That will at least tell users that it's not something they are doing wrong. That message could also tell them to check the changelog, which was the best way I found to quickly assess a themes viability. Another easy change would be to load Grav Team themes by default, instead of using the current "name" selector that shows them all. If a user chooses the name option they would then see a message warning them some themes may be outdated. Showing the "last updated" information might be another easy solution. It's pretty clear that if it was last updated 5 years ago you shouldn't touch it. Frankly, I think any theme that has a security issue shouldn't be there at all. I don't know the mechanism for having themes added to that page but I would be contacting the developer and asking them to update within 14 days or it will be removed. |
Beta Was this translation helpful? Give feedback.
-
well, here are my 0.02€ . |
Beta Was this translation helpful? Give feedback.
-
I and Andy have been adding some tools in my free time to detect compatibility and quality issues in both plugins and themes, but so far I've mostly used those to improve the main plugins. One of them is phpstan, which basically compiles all the PHP code and finds deprecated and badly written code. It can already be used to test plugins as long as you use git version of grav, install dev dependencies from composer and symlink In the future, I hope to have basic tests run for all plugins and themes, but there's still some work to do in order to make it happen. |
Beta Was this translation helpful? Give feedback.
-
These two points seem particularly interesting: in this way, it would be possible to really display the compatibility of a theme or a module with one (or more) specific versions of Grav (a bit like the WordPress directory, as in the screenshot below). |
Beta Was this translation helpful? Give feedback.
-
ExplanationI started https://discourse.getgrav.org/t/plugin-theme-maintenance/22992 in order to try to get the ball rolling in improving Grav by dealing with the broken theme and plugin issue. It got some attention, then it was closed. Yes, it is going to be a lot of work, but isn't that worth it to keep Grav a good and useful application? Instead of closing it, it should have been used as a starting point and improved upon. A new thread or way of organizing the task should have been at least discussed. Moving on ... For Discussion
An example: the Resize Images v0.2.2 plugin has not been updated since 2016. This info is not readily available as it is only displayed on the Github site, and you have to fish for it because the Github link on the plugin page pulls up a 404 not found error. All I am trying to do is get the ball rolling. I like Grav, and I want to do what I can to keep it up-to-date and useful. |
Beta Was this translation helpful? Give feedback.
-
As in the past, I have again done some
grep
-ing on the theme repository, because of recurring posts on Discourse (and Grav repo) about incompatible themes.Results
The results are not really encouraging:
autoescape
What makes a theme incompatible with Grav 1.7?
Since Grav 1.7, all output from Twig templates is so called
autoescape
d, which prevents possible cross-site-scripting (XSS) security issues. The implementation ofautoescape
was a nescesseray decision, but unfortunately introduced a breaking change in themes which are not prepared to handleautoescape
.During the automated upgrade process of Grav 1.6 to Grav 1.7,
autoescape
is switched off to prevent existing sites to suffer from breaking themes.This was nescessary, but is not ideal, because this leaves the security vulnerability still open.
Fresh installs of Grav 1.7.x leave
autoescape
switched on and hence do not display incompatible themes correctly. The suggested fix to manually switch offautoescape
leaves the site again vulnerable to XSS attacks.From mostly upgrades to mostly fresh installs of Grav 1.7
Time has passed since the introduction of Grav 1.7. I think there are nowadays more sites created using a fresh install of Grav 1.7, than sites being upgraded from Grav 1.6. For these new installs, incompatible themes (59%) create a frustrating first impression. And when incompatibilty is being "fixed" a site is again vulnerable to XSS attacks.
Suggestions
A few suggestions to prevent:
Fixing incompatible themes
Prevent installation of incompatible theme
By default, only show compatible themes in theme lists (Admin/GPM/Download site) and add option to also list incompatible themes.
Explain why the theme is incompatible, point to "fix" and explain security risk when applying "fix".
Block users from installing an incompatible and vulnerable theme using Admin/GPM. Inform user about issues.
-force
flag in case the user persists in installing the theme. The user might have good reasons.Show last-update date.
This is an indication that theme might not be the best choice.
Show for which Grav version the theme has been tested by developer (see below).
Quality control
For example:
I think we can savely assume that every theme being developped already has data to test against.
.dependency
to install plugins required for the demo to work properly.Yes, this is quite a bit to read and digest, but nonetheless I would really appreciate feedback and/or suggestions...
Beta Was this translation helpful? Give feedback.
All reactions