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

Failed to upload painting: Article must exist #27

Closed
yickting opened this issue May 29, 2018 · 8 comments
Closed

Failed to upload painting: Article must exist #27

yickting opened this issue May 29, 2018 · 8 comments

Comments

@yickting
Copy link

Anyone encounter this issue as well while trying to upload images in blog post?

Would appreciate some help in fixing it.

Cheers.

@BenoitDK
Copy link

BenoitDK commented Jul 4, 2018

I am running into the same problem...

@BenoitDK
Copy link

BenoitDK commented Jul 4, 2018

This works :

![image alt text](image url)

@yickting
Copy link
Author

yickting commented Jul 4, 2018

Thank you for sharing the solution!

But i only see this: ![image alt text](image url)

Could you share again?

Cheers

@BenoitDK
Copy link

BenoitDK commented Jul 4, 2018

yes just put ![image alt text](image url) in your article with the url of your image

@yickting
Copy link
Author

yickting commented Jul 4, 2018

oh sorry, my vision was blurred just now, I thought I saw some failed screenshot upload error, will give it a try, thanks !!

@ViTVetal
Copy link

Same problem

@hanhdt
Copy link

hanhdt commented Oct 13, 2018

This is happened when you guys are using Rails 5.*

Look at models/lines/picture.rb on belongs_to :article, touch: true. From Rails 5, belongs_to is required by default. In this case, you haven't article persisted yet. Therefore, you got the validation error message like above.

A workaround is updating codes by yourself.
Change belongs_to :article, touch: true to belongs_to :article, touch: true, optional: true in the picture model.

See: #21

@thej
Copy link
Member

thej commented Nov 27, 2018

Fixed in latest release (1.2.6)

@thej thej closed this as completed Nov 27, 2018
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

5 participants