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

attachments are not set as a thumbnail #26

Closed
vasilescuanton opened this issue May 29, 2012 · 3 comments
Closed

attachments are not set as a thumbnail #26

vasilescuanton opened this issue May 29, 2012 · 3 comments

Comments

@vasilescuanton
Copy link

I've followed the code at the link below and the post thumbnail is not set...
http://python-wordpress-xmlrpc.readthedocs.org/en/latest/examples/media.html#

The image is uploaded and post is created but no link is made in between them.
Using latest wp from the nightly builds.

Any idea what am I doing wrong?

@vasilescuanton
Copy link
Author

Finally found the issue!

Line 107 in wordpress.py says: 'thumbnail': "post_thumbnail"
And the example in the documentation says: "post.post_thumbnail = attachment_id"

Changing to "post.thumbnail = attachment_id" worked like charm!

Also found a typo in this line on the same documentation page: "data['bits'] = xmlrpc_clent.Binary(img.read())"
It should be "client" instead of "clent"

Thank you for making this! It's making my life so much easier!

@maxcutler
Copy link
Owner

Thanks for finding those documentation typos, I'll try to get them fixed for the next release.

@vasilescuanton
Copy link
Author

Glad I could help! That's the least I could do :D

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

2 participants