Empty data returned after upgrading from 4.1.3 to 4.3.0

I have…

  • [ ] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [x] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

After upgrading to 4.3.0 (from 4.1.3), a published content entity is returning an empty data node when queried with a client id/secret authorization. When I run the same query in Postman, using the bearer token generated from using the in-app graphql query tool representing my admin user, I see data.

I have tried various permissive levels for the role associated with the client ID, ranging from contents.*.read, then contents.*, then *, and still the data returned empty.

Here is an example of what I receive when querying the REST API using the client ID:

{
  "total": 1,
  "items": [
    {
      "id": "bf22c98b-4b1f-4c63-beea-eb1604465562",
      "createdBy": "subject:5e386cc1c7871d0001c4dc3b",
      "lastModifiedBy": "subject:5e2757ee9c01d800016cefb3",
      "data": {},
      "created": "2020-02-20T21:29:17Z",
      "lastModified": "2020-04-08T02:06:15Z",
      "status": "Published",
      "statusColor": "#4bb958",
      "schemaName": "inventory",
      "schemaDisplayName": "Inventory",
      "version": 20,
      "_links": {
        // REDACTED
      }
    }
  ],
  "statuses": [
    {
      "status": "Archived",
      "color": "#eb3142"
    },
    {
      "status": "Draft",
      "color": "#8091a5"
    },
    {
      "status": "Published",
      "color": "#4bb958"
    }
  ],
  "_links": {
    // REDACTED
  }
}

And here is the result of the identical query, but using my management authorization header:

{
  "total": 1,
  "items": [
    {
      "id": "bf22c98b-4b1f-4c63-beea-eb1604465562",
      "createdBy": "subject:5e386cc1c7871d0001c4dc3b",
      "lastModifiedBy": "subject:5e2757ee9c01d800016cefb3",
      "data": {
        "defaultBackground": [
          "59de0272-8e96-4eb1-a9b6-4f1e920e0595"
        ],
        "messageTemplate": "Browse our inventory of {ITEM_COUNT} items!",
        "categoryHeaders": [
          {
            "productType": "Unit",
            "xType": "AUTO",
            "headerBackground": [
              "5c3e1db0-c8df-4ecb-8a0c-39b3d190516b"
            ]
          },
          {
            "productType": "Part",
            "xType": "9",
            "headerBackground": [
              "6888fc59-0c4e-411f-8ad8-01cd9a8640cb"
            ]
          }
        ]
      },
      "created": "2020-02-20T21:29:17Z",
      "lastModified": "2020-04-08T02:06:15Z",
      "status": "Published",
      "newStatus": "Draft",
      "statusColor": "#4bb958",
      "newStatusColor": "#8091a5",
      "schemaName": "inventory",
      "schemaDisplayName": "Inventory",
      "referenceFields": [
        // REDACTED
      ],
      "version": 20,
      "_links": {
        // REDACTED
      }
    }
  ],
  "statuses": [
    {
      "status": "Archived",
      "color": "#eb3142"
    },
    {
      "status": "Draft",
      "color": "#8091a5"
    },
    {
      "status": "Published",
      "color": "#4bb958"
    }
  ],
  "_links": {
    // REDACTED
  }
}

Both responses have a status of "Published" and both say version 20. The client ID version has an empty object where the data should be.

I have a hunch that this has something to do with the Content Revisions/Versions upgrade, which includes this comment:

The content item can have multiple versions that are in published state. This might be irritating when you consume the content via the API but other users use kafka or other messaging systems to consume the content and for them published very often means that it has been pushed to a messaging system.

Here is a screenshot of the management tool showing that it looks like there is a draft and published version, but there is no difference when I compare the draft and published versions.

Note that this is affecting both the GraphQL responses and REST responses. It is happening on multiple entities. Those entities I’ve seen it on so far have been singletons.

Expected behavior

I would expect the upgrade from 4.1.3 to 4.3.0 to not return empty data for content that was already published.

Minimal reproduction of the problem

If necessary, I can provide a backup of this QA db. The backup is from a 4.1.3 version. When restored onto a 4.3.0 platform, this problem comes up again.

Environment

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 4.3.0

Browser:

  • [ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

It is worth noting that changing the status from Draft to Published causes data to show up. It also shows data when I send the X-Unpublished header. However, I have no indication how widespread this problem is. I’ve seen it on several entities that worked fine in 4.1.3, so I don’t think that simply changing drafts to published versions is the correct fix: These entities already have a published version, it’s just not being returned appropriately.

Hi, the backup would be helpful.

Thanks, @Sebastian. I’ve sent you a link to the backup file in a private message.

1 Like