Problem/Motivation

Using PHP 8.0 we can't change the Display Override option under the Query Settings modal.

Steps to reproduce

  1. Install D7 with PHP 8.0
  2. Create any view
  3. Click on the "Advanced" -> "Other" -> "Query settings" -> "Settings" link
  4. Change the Display Override option (first select element in the modal)
  5. Click on the "Apply (this display)" button

Actual result with an error:

TypeError: explode(): Argument #2 ($string) must be of type string, array given in explode() (line 310 of /[WEBSITE]/sites/all/modules/views/plugins/views_plugin_query_default.inc).

Proposed resolution

  1. Fix the issue.
  2. Add tests to the Views UI to prevent an error in the future.

Remaining tasks

No

User interface changes

No

API changes

No

Data model changes

No

Issue fork views-3409931

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tibezh created an issue. See original summary.

tibezh’s picture

tibezh’s picture

tibezh’s picture

A fail for PHP 8.2 & MySQL 8 tests is not related to the ticket (related ticket).
So we can review the patch.

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, looks good to me!

joseph.olstad’s picture

Great work again @tibezh

tibezh’s picture

I think it will be better to add into a new release

DamienMcKenna’s picture

Have confirmed the bug and have confirmed the fix. Thank you. And yes, this will be in the next release.

  • DamienMcKenna committed fb00aaf3 on 7.x-3.x authored by tibezh
    Issue #3409931 by tibezh, klausi, joseph.olstad, DamienMcKenna: Views...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

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