Hey everyone, interesting one, but all my entries have disappeared after enabling drafts and updating to the latest version of Payload.
The API still gives the correct results:
However the CMS shows as per screenshot. Is there a way to get the articles back?
This happened to me
I had to refresh the page like 10 times
And then they showed up
Wondering if that will work for you
I'll try that, maybe it's client side cache
For me, my Admin would say "2 Pages", but no pages would be listed
(until refreshing a bunch of times)
Yea, not working for me unfortunately, even tried incognito mode
any errors?
I can access it if I copy and paste the ID into the URL. But the list will not show it.
No errors
Odd
Some other people were posting recently about data existing but not showing in admin components
Wonder if it is related
Possibly! First time something like this has happened to me.
Naturally our content editors are freaking out 😅
Hey Tom - We actually had a breaking change in 1.6.1 that required migration of document versions.
Here is more info and the migration script:
this is likely the case
Hey I updated from 1.6.13 to 1.6.17 which caused them to disappear. I'll try run that script though I am concerned about data corruption
Script is giving the error
PAYLOAD_CONFIG_PATH=src/payload.config.ts : The term 'PAYLOAD_CONFIG_PATH=src/payload.config.ts' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ PAYLOAD_CONFIG_PATH=src/payload.config.ts npx ts-node -T ./migrateVer ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (PAYLOAD_CONFIG_...yload.config.ts:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
crossenv issue?
@Tom Try putting
cross-env
at the start of the cmd
might work? the dev command and serve commands start with it
cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts .........
Hey @Tom did you get this sorted or could you use an assist here?
That migration script isn't going to be what you need I'm afraid.
That helps you go update payload on collections that already had versions with the breaking changes.
@Tom What you're seeing is different. Your database had documents in the normal collection location (why you can access them via the id). The list queries the _collectionname_versions table in mongo to show both draft + published results.
You need a migration script that resaves all documents which will create the version collection documents for the list to work.
Hey, I did thanks guys yeah, for some reason I had to put it in my package.json and run it from there with cross-env, that finally got it working, appreciate all the help
Amazing!
Glad to hear it!
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.