Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Using PHP 8.0 we can't change the Display Override option under the Query Settings modal.
Steps to reproduce
- Install D7 with PHP 8.0
- Create any view
- Click on the "Advanced" -> "Other" -> "Query settings" -> "Settings" link
- Change the Display Override option (first select element in the modal)
- 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
- Fix the issue.
- 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
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff_3_6.txt | 567 bytes | tibezh |
#6 | views-php8_type_error_plugin_query-3409931-6.patch | 2.61 KB | tibezh |
Issue fork views-3409931
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:
Comments
Comment #2
tibezh CreditAttribution: tibezh at Drupal Ukraine Community, jobiqo - job board technology commentedHere is a patch with tests only, except failed status for PHP 8.
Comment #3
tibezh CreditAttribution: tibezh at Drupal Ukraine Community, jobiqo - job board technology commentedHere is a patch with tests + a fix.
Comment #4
tibezh CreditAttribution: tibezh at Drupal Ukraine Community, jobiqo - job board technology commentedA fail for PHP 8.2 & MySQL 8 tests is not related to the ticket (related ticket).
So we can review the patch.
Comment #6
tibezh CreditAttribution: tibezh at Drupal Ukraine Community, jobiqo - job board technology commentedA little mistake in my previous patch, attached an actual one.
Comment #7
klausiThanks, looks good to me!
Comment #8
joseph.olstadGreat work again @tibezh
Comment #9
tibezh CreditAttribution: tibezh at Drupal Ukraine Community, jobiqo - job board technology commentedI think it will be better to add into a new release
Comment #10
DamienMcKennaHave confirmed the bug and have confirmed the fix. Thank you. And yes, this will be in the next release.
Comment #12
DamienMcKennaCommitted.