\Drupal\experience_builder\Controller\ApiAutoSaveController::post doesn't provide entity information when reporting validation errors

Created on 1 May 2025, 13 days ago

Overview

found by @lauriii
He was getting this error response when trying to publish

{
    "errors": [
        {
            "detail": "The \u0027imported_js_components\u0027 field is required when \u0027source_code_js\u0027 or \u0027compiled_js\u0027 is provided",
            "source": {
                "pointer": "imported_js_components"
            }
        },
        {
            "detail": "The \u0027imported_js_components\u0027 field is required when \u0027source_code_js\u0027 or \u0027compiled_js\u0027 is provided",
            "source": {
                "pointer": "imported_js_components"
            }
        },
        {
            "detail": "The \u0027imported_js_components\u0027 field is required when \u0027source_code_js\u0027 or \u0027compiled_js\u0027 is provided",
            "source": {
                "pointer": "imported_js_components"
            }
        },
        {
            "detail": "The \u0027imported_js_components\u0027 field is required when \u0027source_code_js\u0027 or \u0027compiled_js\u0027 is provided",
            "source": {
                "pointer": "imported_js_components"
            }
        }
    ]
}

There was not info about which entities these problem were forf

Proposed resolution

\Drupal\experience_builder\Controller\ApiAutoSaveController::post should use EntityConstraintViolationList

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇺🇸United States tedbow Ithaca, NY, USA

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