Open izmeez opened 5 months ago
@klonos I started to take a look at doing this by adding a link to the Status Report. Unfortunately, I had difficulty locating where the code needs to be updated. I was looking in the core > modules > system files. Seems to be several layers deep or I'm in the wrong place.
@izmeez , The Status Report is built using hook_requirements(). The line that shows up as "Backdrop CMS" is added here https://github.com/backdrop/backdrop/blob/fe5c21ced7a7e3bcb9b41df15a7977ee89384a17/core/modules/system/system.api.php#L2578
To find any other lines of the status report, you may need to search the codebase for "hook_requirements".
@kswan Thanks for the heads up. I was actually looking at this, the hook_requirements in system.api.php and wondered if it might be. So, I'm assuming the 'value' needs to be changed or expanded. From what I have glanced over there may already be a helper function that fetches the url.
@izmeez any .api.php file is not participating actively in the code that runs as part of the site - it is meant to be used as examples and it is what our API/docs site "consumes" in order to build the various documentation around the APIs.
You don't need the hook_requirements()
function itself, rather than an actual implementation of that function (a function that has an actual module name instead of hook_
). The specific hook implementation that you should be looking to tweak is system_requirements()
. All hook_requirements()
implementations go in the respective .install file of each module, so you should be looking at the core/modules/system/system.install
file specifically.
If you happen to join the office hours, I can help you further with general tips on where/how to find the code that needs tweaking 😉 (too much to be typing it all here - sorry)
@klonos No apology needed. I appreciate the efforts you make to help me. I am hoping to make it to office hours and hope I have enough bandwidth.
@kswan and @klonos Both your comments are helpful and with that I searched the code base for _requirements
with 110 results in 32 files. More than needed for this item, yet an interesting package of examples to peruse.
Yes, I believe that system_requirements()
in system.install
within the System module is what you need. The rest of the implementations could serve as examples as you said @izmeez 👍🏼
And that is just the first rabbit hole. I found my way to another hook, hook_update_status_alter
... I must admit using VS Code
makes this easier.
Description of the need
The status report at
admin/reports/status
and available updates report atadmin/reports/updates
both show which version of Backdrop CMS is installed. It would be helpful to have a link to the release notes for the version always available.This is especially useful before and even after installing a new version.
The new Backdrop 1.28.0 release notes, like others before it, provide important details on changes and new features. The release notes for this version include information on the new configurable config storage feature.
A simple link to the release notes will be useful and save a lot of time to quickly check when questions arise.
Proposed solution
Add a link to the release notes of the installed version of Backdrop Core on both the Status and Available Updates Reports.