Operator IN on config entity field is wrong or trigger lot of warnings

Created on 10 May 2019, over 5 years ago
Updated 23 July 2024, 3 months ago

Problem/Motivation

If you make an entity query on config entity with operator IN inside condition it doesn't work or trigger lot of warnings.
My field is a simple sequence of string.
It doesn't work if you send an array inside value of condition, it's trigger this and also no result. :

 mb_strtolower() expects parameter 1 to be string, array given in Drupal\Core\Config\Entity\Query\Condition->match() (line 166 of core/lib/Drupal/Core/Config/Entity/Query/Condition.php).
is trigger

Proposed resolution

We mus to fix match method or mathchArray method
I try some things inside matchArray but also the results become wrong.

🐛 Bug report
Status

Postponed: needs info

Version

11.0 🔥

Component
Entity 

Last updated about 7 hours ago

Created by

🇫🇷France musa.thomas France 🇫🇷

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia acbramley

    This was triaged as part of Bug Smash Initiative.

    I tried reproducing this on 10.3 but couldn't:

    \Drupal::entityTypeManager()->getStorage('media_type')
      ->getQuery()
      ->condition('name', ['Document'], 'IN')
      ->accessCheck(FALSE)->execute();
    

    I'm tempted to close this due to the lack of comments and updates since the last time this was traiged, but we will leave it in PMNMI.

    Cheers.

Production build 0.71.5 2024