Background

System module hijacks the admin/reports/status page to group the output from its hook_requirements implementation into "General System Information". This gives admins a heads-up way to view system-level data about their Drupal install.

Bug Description

Unfortunately, this breaks the other heads-up information display about errors and warnings.

If system_requirements generates an error or warning, the feedback doesn't get grouped where we expect to find it with other non-system errors and warnings. This can lead to significant confusion:
- the "details" section doesn't contain the same number of values listed in the heads-up info.
- the errors and warnings generated by system_requirements are not visually denoted in any way to distinguish them from OK operation.
- if system_requirements is the only module generating warnings or errors, the "details" link doesn't work. There is no #error or #warning element on the page, because system.module hijacks them in the theme layer.

Here's an example demonstrating these issues for the "1 error" scenario:
admin/reports/status confusion

Suggested resolutions:

Option 1: if system_requirements returns non-OK requirements, do not group them in the heads-up "General" display
Option 2: if system_requirements returns non-OK requirements, show them twice -- once in the "General" display, and once along with the errors and warnings listings, as applicable.

Here's a screenshot of proposed resolution, option 2, as implemented by patch in #2:
proposed resolution option 2

CommentFileSizeAuthor
#37 2869868-37.patch3.71 KBsmustgrave
#37 interdiff-29-37.txt1.5 KBsmustgrave
#33 Afterpatch-9.4.x-dev.png57.1 KBRinku Jacob 13
#33 Beforepatch-9.3.x-dev.png91.09 KBRinku Jacob 13
#33 Beforepatch-9.4.x-dev.png82.23 KBRinku Jacob 13
#32 reroll_diff_18-29.txt4.43 KBimmaculatexavier
#29 2869868-29.patch3.74 KBimmaculatexavier
#18 drupal-status_report_errors_warnings-2869868-18.patch3.69 KBAaronBauman
#16 drupal-status_report_errors_warnings-2869868-16-TEST-ONLY-EXPECTED-FAIL.patch2.5 KBAaronBauman
#14 drupal-status_report_errors_warnings-2869868-14-TEST-ONLY-EXPECTED-FAIL.patch2.45 KBAaronBauman
#12 drupal-status_report_errors_warnings-2869868-12-TEST-ONLY-EXPECTED-FAIL.patch1.77 KBAaronBauman
#12 drupal-status_report_errors_warnings-2869868-12.patch2.88 KBAaronBauman
#9 drupal-status_report_errors_warnings-2869868-9.patch2.89 KBAaronBauman
#9 drupal-status_report_errors_warnings-2869868-9-TEST-ONLY-EXPECTED-FAIL.patch1.79 KBAaronBauman
#7 drupal-status_report_errors_warnings-2869868-7.patch2.89 KBAaronBauman
#4 Screen_Shot_2017-04-14_at_14_28_36-fullpage.png213.08 KBAaronBauman
#3 drupal-status_report_errors_warnings-2869868-3.patch1.78 KBAaronBauman
#2 drupal-status_report_errors_warnings-2869868-2.patch1.11 KBAaronBauman
Screen_Shot_2017-04-14_at_13_45_32-fullpage.png235.25 KBAaronBauman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aaronbauman created an issue. See original summary.

AaronBauman’s picture

Status: Active » Needs review
FileSize
1.11 KB

Option 2 has the most minimal impact, not messing with the "general info" box at all.
Attached patch contains an implementation of that approach.

AaronBauman’s picture

Here's a test demonstrating the bug described.
I expect this test to fail against unpatched core, and to pass with the patch from #2

AaronBauman’s picture

Updated issue summary with screenshot from patch in #2

idebr’s picture

Issue tags: +Usability

Status: Needs review » Needs work

The last submitted patch, 3: drupal-status_report_errors_warnings-2869868-3.patch, failed testing.

AaronBauman’s picture

Status: Needs review » Needs work

The last submitted patch, 7: drupal-status_report_errors_warnings-2869868-7.patch, failed testing.

AaronBauman’s picture

Status: Needs review » Needs work

The last submitted patch, 9: drupal-status_report_errors_warnings-2869868-9.patch, failed testing.

AaronBauman’s picture

AaronBauman’s picture

Status: Needs review » Needs work

Marking NW until I can get a test to fail the way i expect it to.

AaronBauman’s picture

Here's the patch that we expect to fail to demonstrate the current bugginess.
There are 2 new tests:
testErrorElementCount() to confirm that the "N Errors" counter display matches the number of elements displayed under the "Errors" header
testWarningElementCount() to confirm that "N Warnings" counter display matches the number of elements displayed under the "Warnings" header

Status: Needs review » Needs work

Status: Needs review » Needs work
AaronBauman’s picture

Great, this test is failing as asserted in the OP.
The "Errors" listing has 2 items, but the counter does not say "2 Errors"
The "Warnings" listing has 2 items, but the counter does not say "2 Warnings"

Attached patch includes the failing test from #16, as well as the fix described by Suggested Resolutions Option 2 in OP.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

larowlan’s picture

immaculatexavier’s picture

Rerolled the Patch against 9.4.x. Please review

immaculatexavier’s picture

Issue tags: -Needs reroll

#29 Rerolled the Patch against 9.4.x. Please review

quietone’s picture

@immaculatexavier, thanks for the interest in this issue. To help reviewers always add an interdiff, or a diff, whichever is appropriate. There are instructions for creating an interdiff . If you think a diff is not needed, add a comment stating why. Thanks!

immaculatexavier’s picture

FileSize
4.43 KB

@quietone,
Sorry for the inconvenience, I do agree interdiff is necessary.
Attached the diff for rerolled patch #29

Rinku Jacob 13’s picture

Hi, I need some clarification about the issue, Because The "details" section contains the same number of Errors and warnings listed in the heads-up info before and after the patch was applied. But the number Checked value is different in both heads-up and detail info. After the patch, I counted the number of checked values. I got the value as 24. but in heads-up, it's showing as 23, Can anyone please check about that?

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

This issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 200, following Review a patch or merge require as a guide.

D10 version needed
At this time we would need a D10.1.x patch or MR for this issue.

smustgrave’s picture

catch’s picture

Status: Needs review » Reviewed & tested by the community

Small fix with plenty of new test coverage. Looks good.

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2d6ae27 and pushed to 10.1.x. Thanks!

  • lauriii committed 2d6ae27e on 10.1.x
    Issue #2869868 by AaronBauman, immaculatexavier, smustgrave:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.