I was working on some issues around https://github.com/backdrop-contrib/ckeditor5 (which is slated to eventually be added into core), and quickly realized that I cannot edit the status report page entries provided by the CKEditor module in core (v4). In general though, if you try to override the values of the existing $requirements[]
array provided by hook_requirements()
implementations of any module (core or otherwise), you are getting a php error about strcasecmp()
in _system_sort_requirements()
expecting a string and be provided with an array instead (which is true - that's what happens if you try to re-define an existing array key in $requirements[]
).
A quick research surfaced #309040: Add hook_requirements_alter(), which has already been implemented in D9.5.x (change record: Third-party modules are able to alter the requirements entries, commit + follow-up commit to fix a typo + a currently RTBC follow-up issue to have the new alter hook work during update: https://www.drupal.org/project/drupal/issues/3324995), which I think we should introduce in Backdrop as well. From the dorg issue:
Problem/Motivation
Requirements are produced by implementing the
hook_requirements()
hook. But there's no way they can be altered. Consider some situations that requires alteration:
- A distribution works only with a higher version of PHP than the underlying Drupal core it depends on.
- A module wants to decrease or to increase the severity of a requirement.
- Other modules want to add more details in the requirement description entry.
- A CI/CD system checks for errors & warnings at the end of a production deployment. If there are some, it rolls-back the deployment. However, they want to define some exceptions that are acceptable.
- A module simply wants to remove a requirement provided by other module.
Note that the Drush command
core:requirements
did already implement the--ignore
option but that helps only to achieve removal of requirements and not alteration.
...
Original report by David_Rothstein
This patch introduces a
hook_requirements_alter()
hook to Drupal. A possible use case is discussed in http://drupal.org/node/295697 (allowing modules to modify the recommended minimum PHP memory limit provided by Drupal core), but there are others....
From #3184320: Improve DX for updates to status report requirements, which was closed as a duplicate of #309040: Add hook_requirements_alter()
Problem/Motivation
There are cases in which you may want to change the severity of a status page requirement (e.g., downgrade or upgrade) e.g. what we are doing at https://www.drupal.org/project/trusted_reverse_proxy to downgrade an error to info/checked.
Steps to reproduce
It's possible to adjust the variables for the status report page with hook_preprocess_HOOK(), e.g. hook_preprocess_status_report_page(), however this addresses the render array a little too late in the pipeline. ...
From #2869592: Disabled update module shouldn't produce a status report warning (which this change will help make easier):
On the status report, if you have uninstalled the Update module you will get a big scary warning:
Update notifications are not enabled. It is highly recommended that you enable the Update Manager module...
There are many situations where it's perfectly reasonable to disable the update module, such as in an enterprise environment where you monitor for updates via other dedicated means and don't want the performance impact of having Update enabled in production. In these cases, the warning is just a distraction and contributes to a "crying wolf" mentality.
Ideally, there would be a way for expert administrators to disable this warning.
Release notes snippet
Requirements defined in HOOK_requirements()
implementations can now be altered by implementing HOOK_requirements_alter()
.
Recent comments
@indigoxela and @quicksketch - Thank you. This was the part I was missing. I was not getting the alignment options in the balloon toolbar, because I had not enabled the Float Images...
CKEditor 5 - How to align images
Out of the box: click on the image, then use the balloon toolbar to select alignment: You can also click the Pencil icon to open the image dialog, where the alignment options are also...
CKEditor 5 - How to align images
You seem to be using IMCE, is that correct? A little bit more info about your setup would be helpful, though. Your screenshot looks like it's from Drupal 7 ... Alignment in CKE5 happens...
CKEditor 5 - How to align images