Getting error: "This value should be of the correct primitive type." when adding and saving PowerBi Embed field to Content Type

Created on 24 July 2025, 3 months ago

Problem/Motivation

When trying to create a new Content Type and add PowerBI Embed field, I get this error:
"This value should be of the correct primitive type" and all PowerBI Embed related fields are highlighted
This is on a Drupal 10.4.6 site

Steps to reproduce

1) Create new Content Type
2) Add PowerBI Embed field to the Content Type
3) Fill all fields and try to Save

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @westdylank
  • I debugged this further and added the following code and printed out the value that was triggering this error in the /web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php:

        if (!$valid) {
          // @todo Provide a good violation message for each problem.
          $msg = $constraint->message . " ||| " . print_r($value, TRUE);
          $this->context->addViolation($msg, [
            '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value),
          ]);
        }
    

    This is the value I get along with the error message. In the config form, I had used 100, 100, 100 for the breakpoints and % as the value type:

    Array
    (
        [pwbi.sm] => Array
            (
                [height] => 100
            )
    
        [pwbi.md] => Array
            (
                [height] => 100
            )
    
        [pwbi.lg] => Array
            (
                [height] => 100
            )
    
    )
    
Production build 0.71.5 2024