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.

Comments

bogdog400 created an issue. See original summary.

bogdog400’s picture

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!

bbrala’s picture

Category: Bug report » Support request

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

bogdog400’s picture

Thanks. That could be.

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

Or is this deeper in the network?

bbrala’s picture

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

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Active » Fixed

I think this can be closed. @bbrala pointed @bogdog400 in the right direction and there have been no further queries.

The Drupal Core issue queue is not the ideal place for support requests. There are several support options listed on our Support page, including the Drupal Forums and Drupal Answers.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.