Update error in eca_post_update_rename tokens

Created on 9 July 2024, 5 months ago
Updated 30 August 2024, 3 months ago

Problem/Motivation

While upgrading a site from 1.x to 2.x, got this error:

>  [notice] Update started: eca_post_update_rename_tokens_2_0_0                                                                                                        
>  [error]  TypeError: str_contains(): Argument #1 ($haystack) must be of type string, array given in str_contains() (line 74 of /var/www/html/queencity/dev-site/web/modules/contrib/eca/eca.module) #0 /var/www/html/queencity/dev-site/web/modules/contrib/eca/eca.module(74): str_contains()            
> #1 /var/www/html/queencity/dev-site/web/modules/contrib/eca/eca.post_update.php(30): _eca_post_update_token_rename() 

Steps to reproduce

This turned out to be a custom diff plugin, that had a "value" config that was loaded as an array, while this update function expects a string.

Proposed resolution

Either patch this update function to allow arrays, or fix my plugin to store/load the "value" as a string. Not sure which is the correct approach here

Remaining tasks

Patch.

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024