SQL rewrite warning falls out of sync with setting status

Created on 29 August 2017, over 7 years ago
Updated 16 February 2023, almost 2 years ago

Problem/Motivation

The Views UI "SQL rewrite" warning toggles between shown and hidden states when the "Disable SQL Rewriting" box is checked/unchecked, but it doesn't take into account the actual status of the setting.

As a result, the warning can easily fall out of sync with the selected setting. This may mislead users into thinking the safer setting is unsafe and vice versa.

Steps to reproduce

  1. Create a new basic view.
    • Show: Content
    • Type: All
  2. In the view configuration page, open Query settings.
  3. Check the "Disable SQL Rewriting" box. SQL rewrite warning is shown (Expected)
  4. Click "Apply"
  5. Open Query settings again.
  6. Uncheck the "Disable SQL Rewriting" box. SQL rewrite warning is shown (Unexpected)

Proposed resolution

Check if the "Disable SQL Rewriting" box is actually checked before showing the warning.

Remaining tasks

  • Review patch.

User interface changes

Display warning only when relevant - when user checks "Disable SQL Rewriting" option.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

10.0 ✨

Component
Views UIΒ  β†’

Last updated 21 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States jwkovell

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024