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

$client->open_revs('all')->getDoc($id) returns non-object #48

Open
ckmaresca opened this issue Jun 18, 2013 · 6 comments
Open

$client->open_revs('all')->getDoc($id) returns non-object #48

ckmaresca opened this issue Jun 18, 2013 · 6 comments

Comments

@ckmaresca
Copy link

Trying to get all revs using

$client->open_revs('all')->getDoc($id);

returns the following weirdness

--43afb13b61f1044f5713cb42ae4138b4
Content-Type: application/json

{json_data_structure}
--43afb13b61f1044f5713cb42ae4138b4--

This looks like some sort of debug output rather than the datastructure I was expecting..... Or am I missing something? Also, even with multiple revs, it only shows the latests.

Chris

@nomad23
Copy link

nomad23 commented Nov 25, 2013

I get the same error. Anyone know how to fix this?

@ClemensSahs
Copy link
Contributor

"open revs" is for solve conflicts...

my expectation is that we return an array with doc objects... but this is currently not done

@nomad23
Copy link

nomad23 commented Nov 28, 2013

Hmmmm... This appears to be a couchdb issue... Currently Working on couch 1.4 on ubuntu and when i run the query on restclient, i get the same multipart encoded data..... Im not sure though... Still looking into it. For now, i've resorted to extending the couchclient class to get revision information, then query for one revision at a time. Its a bit tedious but it works for the moment.... Any suggestions are highly welcome...

@ClemensSahs
Copy link
Contributor

i have currently only access on an couchdb 1.3
the response looks fine for me, only our client can not handle this currently

have somebody access to a conflict response? ( with and without attachment for the doc )

http://localhost:5984/klinai_test_db1/7e554f4b48c2b2917c312de57d00102a?open_revs=all

--78acafd0832dce76baceca2fd7b606a9
Content-Type: multipart/related; boundary="2dcfd17e72ac46308cc0b1b397935980"

--2dcfd17e72ac46308cc0b1b397935980
content-type: application/json

{"_id":"7e554f4b48c2b2917c312de57d00102a","_rev":"3-99362f7ab706cdf5009feaaa2b352c77","key1":"foo","key2":"bar","_attachments":{"attachment.txtbyContent":{"content_type":"text/plain","revpos":3,"digest":"md5-w3zL1Dm7YulczusfIw8kXg==","length":26,"follows":true,"encoding":"gzip","encoded_length":44},"attachment.txtbyFile":{"content_type":"text/plain","revpos":2,"digest":"md5-w3zL1Dm7YulczusfIw8kXg==","length":26,"follows":true,"encoding":"gzip","encoded_length":44}}}
--2dcfd17e72ac46308cc0b1b397935980

binary data
--2dcfd17e72ac46308cc0b1b397935980

binary data
--2dcfd17e72ac46308cc0b1b397935980--
--78acafd0832dce76baceca2fd7b606a9--

http://localhost:5984/klinai_test_db1/aba4e90bf5e4659d941c540a060458b6?open_revs=all

--76f0b9e0dcd7f117ae9952db8dd85ec0
Content-Type: application/json

{"_id":"aba4e90bf5e4659d941c540a060458b6","_rev":"3-59be9ec10ea5a588395eddfc5f51eaa3","key1":"foo","key2":"bar"}
--76f0b9e0dcd7f117ae9952db8dd85ec0--

@ClemensSahs
Copy link
Contributor

@nomad23

I will be create the old support level, if you have some status update for us you find us there. I have the hope that dready92 join the organization if he has more time.
php-on-couch organization

@andreyvk
Copy link

Same problem here... Any way this gets fixed any time soon?

popojargo added a commit to popojargo/PHP-on-Couch that referenced this issue Sep 10, 2017
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