I have…
- [x] Checked the logs - Nothing beyond lots of INFO log noise, though this seems like it could be a data problem from migrations and not a bug that causes a crash
I’m submitting a…
- [x] Regression (a behavior that stopped working in a new release)
- [ ] Bug report
- [ ] Performance issue
- [ ] Documentation issue or request
Current behavior
I upgraded from 4.1.3 to 6.5.0, and I changed my graphql queries to the newer format (a few things were renamed since 4.1.3). For a lot of data, everything seems fine. But I am noticing some odd inconsistencies where some data is missing or somehow the Published version is lost or regressed.
Here is a picture of the Admin tool which shows a value for the Message Template field on the Published version.
However, when I query via GraphQL, this shows as null:
$ curl $GRAPHQL_API_URL -H 'X-Languages: en-US' -H 'Content-Type: application/json' -H "Authorization: Bearer $READER_TOKEN" --data-raw $'{ "query": "{ queryInventoryContents { flatData { messageTemplate } } }" }' | jq
{
"data": {
"queryInventoryContents": [
{
"flatData": {
"messageTemplate": null
}
}
]
}
}
But, if I add the “X-Unpublished: true” header, that field’s data shows up.
$ curl $GRAPHQL_API_URL -H 'X-Languages: en-US' -H 'Content-Type: application/json' -H "Authorization: Bearer $READER_TOKEN" --data-raw $'{ "query": "{ queryInventoryContents { flatData { messageTemplate } } }" }' -H 'X-Unpublished: true' | jq
{
"data": {
"queryInventoryContents": [
{
"flatData": {
"messageTemplate": "Browse our inventory of {ITEM_COUNT} items!"
}
}
]
}
}
Prior to the upgrade, this entity was published.
It feels like it has something to do with data that may have been corrupted during the upgrade from 4.1.3 to 6.5.0, and/or something to do with published/draft content that is somehow not coming through correctly.
Expected behavior
I would have expected data that was Published at v4.1.3 to remain published after the upgrade.
Minimal reproduction of the problem
My testing is on a non-production database, and if it would help debugging, I could provide a MongoDB dump from before and after the upgrade privately.
Environment
- [x] Self hosted with docker
- [ ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: Bug appeared after upgrading to 6.5.0 from 4.1.3
Browser:
Not specific to any browser since this is an API call issue