Update error in eca_post_update_rename tokens

Created on 9 July 2024, 6 months ago
Updated 30 August 2024, 4 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

  • Issue created by @freelock
  • Status changed to Needs review 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

    MR contains my patch for allowing this config to get upgraded.

  • Pipeline finished with Success
    6 months ago
    Total: 441s
    #220041
  • Status changed to Needs work 6 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    This is looking good except for one minor issue. Also, let's do bug fixes against the latest dev release and then back port.

  • Pipeline finished with Failed
    5 months ago
    Total: 377s
    #232379
  • Pipeline finished with Failed
    5 months ago
    Total: 304s
    #232384
  • Pipeline finished with Canceled
    5 months ago
    Total: 545s
    #232831
  • Pipeline finished with Success
    5 months ago
    Total: 469s
    #232847
  • Status changed to Needs review 5 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    I've fixed the merge conflict which was committed in the code and simplified the solution even further: we can so a search and replace without checking first, if the string is available. @freelock could you please test this once again with your installation? I don't have such a scenario with array values in config and therefore can't see, if this really fixes your issue.

  • Pipeline finished with Success
    5 months ago
    #233277
  • Pipeline finished with Success
    5 months ago
    Total: 484s
    #233596
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @freelock any chance for a review?

  • πŸ‡ΉπŸ‡·Turkey salihcenap

    Any patch for this yet?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Yes, there is an Mr above.

  • Status changed to RTBC 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

    Just applied to another site... changes look and work fine to me!

  • Pipeline finished with Skipped
    4 months ago
    #255898
  • Status changed to Fixed 4 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Thanks @freelock

  • Pipeline finished with Success
    4 months ago
    Total: 371s
    #255893
  • Pipeline finished with Success
    4 months ago
    Total: 439s
    #255894
  • Pipeline finished with Success
    4 months ago
    Total: 446s
    #255895
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    29 days ago
    Total: 754s
    #352952
  • Pipeline finished with Failed
    28 days ago
    Total: 650s
    #354169
  • Pipeline finished with Failed
    28 days ago
    Total: 290s
    #354178
  • Pipeline finished with Success
    28 days ago
    Total: 690s
    #354183
  • Pipeline finished with Skipped
    28 days ago
    #354200
Production build 0.71.5 2024