Why did the JSON:API module start returning big arrays when CREATING?

Created on 26 July 2023, 11 months ago
Updated 4 August 2023, 11 months ago

Problem/Motivation

I've been successfully creating new content nodes with the JSON API for a while by POSTing a JSON block to this URL:

http://domain.name/jsonapi/node/contentType

In the last few weeks, though, something changed. Before, I would get a data OBJECT in the response with just the new node. Now I'm getting a full ARRAY with all of the contentType nodes. It's yuge.

The code ran fine about a month ago. Now the new array (and all of the data inside it) is crushing the process.

Any ideas where to look? Did I somehow trip something when reconfiguring?

TIA.

πŸ’¬ Support request
Status

Active

Version

10.1 ✨

Component
JSON APIΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bogdog400

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

Comments & Activities

  • Issue created by @bogdog400
  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    This is kind of strange. I think the problem is caused by using the full domain name instead of the IP address in the URL. In other words:

    http://domain.name/jsonapi/node/contentType

    behaves differently than

    http://IP.ADD.RE.SS/jsonapi/node/contentType

    In the past, I was just using the IP address in the URL because I was building out the site. Last week, I turned off this configuration in the NGINX front end and started using only the full domain name. So literally the only change I made in my code was switching the URL.

    When I turn back on that configuration file in NGINX and then use the IP address in the URL, I get the old format response from POSTing a new piece of content. The JSON has field right where I expected them.

    Is there something that could be causing this?

    TIA!

  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    There might be some redirect happening in your application? Can you see if you are being redirected perhaps?

  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    Thanks. That could be.

    Is there some place I should check? The NGINX configuration files?

    Or is this deeper in the network?

  • πŸ‡³πŸ‡±Netherlands bbrala Netherlands

    I would first look at console. Also you could look at the nginx log.

Production build 0.69.0 2024