Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to push related content type entries #972

Closed
anja98 opened this issue Jul 24, 2014 · 2 comments
Closed

Unable to push related content type entries #972

anja98 opened this issue Jul 24, 2014 · 2 comments

Comments

@anja98
Copy link

anja98 commented Jul 24, 2014

I'm using wagon 1.4.0 and engine 2.4.1

Following instructions from http://doc.locomotivecms.com/making-blog/3-5-related-types, I've created Posts and Comments with the relationship of a post has many comments.

posts.yml

name: Posts
slug: posts
description: A description of the content type for the editors
label_field_name: title
order_by: manually 
fields: 
- title: 
    label: Title
    type: string
    required: true
    hint: A description of the field for the editors
    localized: false
- comments: 
    label: Comments
    type: has_many
    required: false
    localized: false
    class_name: comments
    inverse_of: post  
    ui_enabled: true 

comments.yml

name: Comments
slug: comments
description: A description of the content type for the editors
label_field_name: message
order_by: manually 
fields: 
- message: 
    label: Message
    type: string
    required: true
    hint: A description of the field for the editors
    localized: false
- post: 
    label: Post
    type: belongs_to
    required: true
    hint: A description of the field for the editors
    localized: false
    class_name: posts

Heres how the sample data look like:
data/posts.yml

- "Sample 1"

- "Sample 2"

- "Sample 3"

- "Sample 4"

data/comments.yml

- "Sample 1":
    message: "This is a message"
    post: sample-1 # Permalink of the target entry

- "Sample 2":
    message: "This is a message"
    post: sample-2 # Permalink of the target entry

- "Sample 3":
    message: "This is a message"
    post: sample-3 # Permalink of the target entry

- "Sample 4":
    message: "This is a message"
    post: sample-4 # Permalink of the target entry

I've tried adding the relationship through the engine backend and pulling it back to wagon. Deleted the backend model and push it back to force a re-create using the engine generaged yml, I enocounter the same error as well.

This seems to be a bug?

@P3t3rU5
Copy link

P3t3rU5 commented Jul 14, 2015

@anja98 Any luck with this issue? I'm having trouble with this as well.

@manuchap
Copy link
Contributor

Move your yml files out of the data folder and put them back in one at a time and push. Start with the least complex model and do the ones with relations last.
Good luck ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants