Created on 23 March 2024, 3 months ago
Updated 17 April 2024, 2 months ago

Problem/Motivation

Issue https://www.drupal.org/project/bat_api/issues/3411329 🐛 With Drupal 10.2.0 the rest api doesn't return a valid json Needs work is not easy to debug

It's taking quite long time to me to reproduce the issue

Reproduce

Noting here debug trace, trying to get help from community.

* start a fresh drupal istance with

  a@cubo:~/Public/d10$ composer show | grep "drupal/core"
  drupal/core                              10.2.4            Drupal is an open source content management platform powering millions of websites and applications.
  drupal/core-composer-scaffold            10.2.4            A flexible Composer project scaffold builder.
  drupal/core-project-message              10.2.4            Adds a message after Composer installation.
  drupal/core-recommended                  10.2.4            Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.
  drupal/core_event_dispatcher             4.0.1             Registers event dispatchers for several core hooks
  a@cubo:~/Public/d10$ composer show | grep bat
  drupal/bat                               2.1.0             A generalized Booking and Availability Management Framework
  drupal/bat_api                           3.1.0-rc2         API access to BAT Booking and Availability Data for Drupal
  drupal/bat_event                         2.1.0             Create and administer events for BAT.
  drupal/bat_fullcalendar                  2.1.0             Provides a generalized API for manipulating FullCalendar widgets for BAT
  drupal/bat_unit                          2.1.0             Create and manage units (e.g. rooms).
  roomify/bat                              1.4.0             A booking and availability management library
  

* Create a couple of BAT units

  Name Type Status Operations
  1	apt 1	Default	Published	Edit
  2	apt b	Default	Published	 Edit
  

* Query BAT API
http://d10.bat/bat_api/calendar-units?_format=json&types=1&ids=&event_ty...

output:

    {
        "id": "1",
        "title": "Apts Property #1",
        "children": [
            {
                "id": "S1",
                "title": "apt 1",
                "create_event": true
            },
            {
                "id": "S2",
                "title": "apt b",
                "create_event": true
            }
        ]
    }
]

JSON is valid! [via https://jsonlint.com/]

BAT API produces correct json output when on very basic entities.

How can I reproduce the actual issue at https://www.drupal.org/project/bat_api/issues/3411329 🐛 With Drupal 10.2.0 the rest api doesn't return a valid json Needs work

📌 Task
Status

Closed: works as designed

Version

3.1

Component

Code

Created by

🇮🇹Italy afagioli Rome

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

Comments & Activities

Production build 0.69.0 2024