Comments (11)
There's the following piece of code in the library. It filters all the entities and decides if they should be published or not:
const entityIdsToPublish = sourceEntities
.filter(({ original }) => original.sys.publishedVersion)
.map(({ original }) => original.sys.id)
Only after finding this, it get clear that if an entity has to be published, it should contain sys.publishedVersion
field
from contentful-cli.
I am sorry, does anyone have a solution for this?
Example:
{
"entries": [
{
"sys": {
"publishedVersion": 1,
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "4zg16q5vss6b"
}
},
"environment": {
"sys": {
"id": "staging",
"type": "Link",
"linkType": "Environment"
}
},
"contentType": {
"sys": {
"type": "Link",
"linkType": "ContentType",
"id": "model"
}
}
},
"fields": {
"tesyId": {
"it-IT": "0049130"
},
"synced": {
"it-IT": false
}
}
}
]
}
from contentful-cli.
Hi @scaccogatto
Is there already content in the space you're importing into?
You can read more about the publishing strategy of the import tool when there is existing content here: https://github.com/contentful/contentful-import#bulb-importing-to-a-space-with-existing-content
The sys
properties are ignored, so sending published data in the sys
payload will not force a publish.
from contentful-cli.
I solved by using the cli manually, so I don't need this feature anymore.
If it helps, yes, there is already content in the space.
from contentful-cli.
glad you were able to solve it.
The existing content in the space, and its status (published, draft, etc) was likely having an effect on whether the import tool published the content.
from contentful-cli.
I am sorry, this was 10 day ago. I forgot almost everything. I did NOT solve this problem with the cli.
I cannot make it publish after importing.
The content imports correctly but it tets itself to draft.
There is more content in the space but not the one that I am importing. I am stuck.
from contentful-cli.
@scaccogatto could you open a new issue and we can continue debugging there?
from contentful-cli.
Hi, @scaccogatto did you get any feedback on this? I'm facing the same issue. Imported assets are set as drafts.
Thanks in advance.
from contentful-cli.
Hi, @scaccogatto did you get any feedback on this? I'm facing the same issue. Imported assets are set as drafts.
Thanks in advance.
I had to rewrite my logic with the contentful js sdk.
Never had the chance to write the whole thing as I wanted because of this bug.
from contentful-cli.
figured it out
from contentful-cli.
@KaterynaBoiko is right, and to clarify: for each entry to contain the sys.publishedVersion
, the --include-drafts
option (when exporting the content in the first place) should be set to true
. Then when the content is imported, it will hold the correct draft/published status.
from contentful-cli.
Related Issues (20)
- `merge show` and `merge export` commands result in `PollTimeout` error HOT 3
- Exit code 0 after failure with `--await-processing`
- Exits with status code 0 when failing in `--await-processing`
- Space export of published content HOT 1
- Embargoed PDF (4MB) asset cannot be imported to new contentful environment HOT 2
- Make it possible to skip more information when exporting a space
- `contentful space import` is stuck HOT 5
- Importing a locale with fallbackCode: null -> fallback gets set to the default locale
- Generated migration files swap field controls based on alpha order and field definition order HOT 3
- Plain text/JSON output for commands
- Please do less automatic releases
- Cloning an environment should also clone Workflows App configuration
- patch-package: not found HOT 2
- Error: Cannot find module esprima HOT 8
- Format variables in merge export --output-file
- `CRITICAL` Security Vulnerability
- Configured host is ignored for migration HOT 1
- Generated migration scripts does not contain the necessary parameters for `Contentful:GraphQLFieldResolver` annotation id
- renaming an environment
- Skipping existing assets and content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contentful-cli.