Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Empty Body #5

Open
magtak opened this issue Dec 20, 2011 · 8 comments
Open

Empty Body #5

magtak opened this issue Dec 20, 2011 · 8 comments

Comments

@magtak
Copy link

magtak commented Dec 20, 2011

Apart from a minor bug in the IBOUtlet connections which i fixed (basically the textboxes were mixed up - no biggy) I can't seem to add body to my article.

Site config is 7.x w/ Services 3.x. Any ideas?

@kylebrowning
Copy link
Owner

Are you positive you have the 7.x version of the code checked out?

@magtak
Copy link
Author

magtak commented Dec 21, 2011

If it's only the lines in DIOSNode, yes :)

@kylebrowning
Copy link
Owner

How are you setting the body? Its not, its also the code in the NodeViewController

@magtak
Copy link
Author

magtak commented Dec 21, 2011

Eh.. that's what i meant - NodeViewController. Those are the lines I uncommented. (Can't see any lines that need uncommenting in DIOSNode - just checking if by mistake i figured it out myself). I am setting the body both via the UI and also tried hardcoding it. The article is succesfully submitted, with the correct title, sometimes the correct user (it's anonymous sometimes) but never an article body.

@magtak
Copy link
Author

magtak commented Dec 21, 2011

one thing I don't quite get and might be the problem is the appearance of these 2 lines of code in NodeViewController:

[nodeData setObject:languageDict forKey:@"body"];
[nodeData setObject:[bodySaveField text] forKey:@"body"];

setting 2 different values for the "body" key? Am i missing something in your - other than that - awesome code? :)

@magtak
Copy link
Author

magtak commented Dec 21, 2011

also, just noticed that in the site's content the language for the aforementioned article is "Undefined language ()" whereas the others are "Language Neutral" in case that helps somehow.

@kylebrowning
Copy link
Owner

If you look at how the array is formed in PHP you'll see how it needs to be sent. I think I'm going to fix this in future versions of DIOSSDK

saveNode, should handle everything you need it to, but for fields its always different based on the field type.

The SDK needs a way to pass a value and a field type and get back the correct object structure in C, but I havnt gotten around to doing that and figured for now just building the array like it needs to be done is the easiest.

@magtak
Copy link
Author

magtak commented Dec 23, 2011

were you able to reproduce btw?

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

No branches or pull requests

2 participants