New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show notice in the admin UI when .htaccess, robots.txt, or settings.php have been updated in a release, and either link to instructions, or auto-update when safe/possible #5911
Comments
AFAIK, we have facilities/functions to be updating the And settings.php is a php file, so we could use linked ( Another thought is that we could be replacing these files automatically during updates, but only after checking and making sure that they have not been modified compared to the previous "vanilla", core-provided respective file. In the case of #5906 we could add a check for when the php version used is v5 or v7, and also check if the added section in the existing .htaccess file is present or not, then throw a notice in the status report, along the lines of "your existing .htaccess file is lacking support for PHP v8 - certain things may not work as expected - you will need to update it manually - here's a link with more details". But this is very specific to this use case - not a generic, reusable thing. Point being that we may be able to do something on a per case basis as these files are being updated. Would love to see what others think, and if you have any other ideas. |
Possibly the solution is more about documentation and giving details about what has changed, rather than update everything and account for every edge case. For the recent .htaccess changes, it should be enough to say here is what we've added and this is where we added it; the easiest thing is to copy this into your .htaccess file on this line. Can we show a notice after we've updated? Can we have a notice in Backdrop news on the Dashboard? Can we have custom messages in the release notifications? |
I agree, and I see it as a general problem regarding updates with breaking or important changes, be it core or contrib. There are links which point to the release notes on A custom message in the updater pages, near the number of a recommended release link, sounds promising. But wouldn't it just repeat (part of) the release notes? My idea: a special category for releases which require subsequent and/or manual changes. Releases of that category would be styled differently, comparable to security updates, but less alarming, e.g. using the blue for info messages and maybe also highlighting the link to the release notes. |
I like that idea!! |
What about the idea of auto-updating these files if they have not been customized? ...although we'd need to figure out a way to know what the vanilla/uncustomized versions of these files are 🤔 ...thinking of some ways to version them, or checksum them perhaps? Anyway, auto-updating these would solve half of the problem ...there wouldn't be a need to let people know what has changed nor what needs to be done (because there would be nothing to do). |
The issue was discussed in the Developer Meeting from 2023/01/05, main idea: combine auto-updating of non-customized files and adding a message about file changes: |
In case we want to do some advanced parsing and want to use something already created, here's an open source (Apache License 2.0) htaccess parser: https://github.com/tivie/php-htaccess-parser |
Just to add to this discussion, I've added a thought to the auto-update ticket at #5929 (comment) |
Description of the need
The documentation for updates is based around a manual update on the server. However we have an updater in the UI, which many people will use to update Backdrop.
The upcoming release, 1.24.0 includes an update to the
.htaccess
file in the root directory (likely to have changes) and the.htaccess
file infiles/
and the release notes for the preview state:'The
.htaccess
file has been modified to include settings for PHP 8. (See #5906)'Site owner who just use the updater might not see these release notes and may not know.
@klonos has suggested on Zulip that the updater will only update the core folder so at least customisations won't be broken, but how should they get the updates?
Proposed solution
Site owner should be guided through updating the files without losing their customisations.
Not sure how best to do this.
The text was updated successfully, but these errors were encountered: