Created on 23 July 2018, over 6 years ago
Updated 27 August 2024, 3 months ago

I am unable to get the page content when using REST calls

Drupal 8.5.5
Page Manager 8.x-4.0-beta3

When a page is created I can access it vie browser as html, however when I try to call it as s REST json respose I get:
{"message":"Not acceptable format: json"}

The RESTful Web Services and serialization are enable, and working perfectly fine for Drupal core content types article and page.

I am using the _format switch to get the response in json format
http://localhost/test1?_format=json ( /test1 is the path to the block page)

Drupal log show the below:
Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException: Not acceptable format: json in Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber->onRespond() (line 30 of /Users/piotr/Projects/rest_test/core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php).

🐛 Bug report
Status

Active

Component

Code

Created by

🇵🇱Poland psuplat

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024