Problem/Motivation

We are seeing an error after upgrading to Drupal 10.1.3. Specifically this error:

TypeError: reset(): Argument #1 ($array) must be of type array, string given in reset() (line 247 of /code/web/modules/contrib/views_json_source/src/Plugin/views/filter/ViewsJsonFilter.php).

Steps to reproduce

We had the module installed and performed the upgrade to Drupal. Our view is now throwing this error.

Proposed resolution

I'm going to attempt a patch to fix.

CommentFileSizeAuthor
#3 3387673-3.patch704 bytesabelcain
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:

Comments

wheelercreek created an issue. See original summary.

abelcain’s picture

StatusFileSize
new704 bytes

For us is failing at version 10.1.2. We attach a patch based upon the solution at the MR#4

keshavv’s picture

Status: Active » Needs review

The patch #3 looks good.

abelcain’s picture

It would be good if the MR gets checked and merged, and a new release of module is done soon with this and other issues.

joao.ramos.costa’s picture

Hi @abelcain, the attached patch at #3 doesn't match with the MR-4:
https://git.drupalcode.org/project/views_json_source/-/merge_requests/4.... ,

just noticed by checking cweagans/composer-patches plugin failing not applying patch.

Cheers,

João.

astonvictor’s picture

Version: 8.x-1.4 » 2.0.x-dev

astonvictor’s picture

Hi there,

I was able to reproduce the error by enabling the Allow multiple selections option for the exposed filter.
Also, found that it doesn't work with exposed operators. So, fixed it as well.

astonvictor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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