[PCBC-34] Using PHP library to store json encoded utf-8 values appears to add content as an attachment with no reason Created: 01/Feb/12  Updated: 15/Dec/12  Resolved: 05/Sep/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.0
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Taylor Dondich Assignee: Matt Ingenthron
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: php 5.3, 2.0.0 community edition (build-388-gf35126e)


 Description   
when attempting to add a document with the following value:
{"ent_seq":"1000000","r_ele":[{"reb":"\u30fd"},{"reb":"\u304f\u308a\u304b\u3048\u3057"}],"sense":[{"pos":["&n;"],"gloss":[{"lang":"en","gend":null,"value":"repetition mark in katakana"},{"lang":"ger","gend":null,"value":"(n) Wiederholung"},{"lang":"ger","gend":null,"value":"Refrain"}]}]}

Fails. However, adding this string in via the couchbase admin ui works correctly.

The failure is it adds it as an attachment, not as a document. This breaks the functionality of views. The get method works properly and returns the array data.


 Comments   
Comment by Jan Lehnardt (Inactive) [ 03/Feb/12 ]
Thanks for the report. I'll be looking into this early next week :)
Comment by Michael Nitschinger [ 26/Aug/12 ]
Since this bug report has been filed a lot has changed, and I couldn't reproduce this behaviour on the latest 1.1 SDK with a recent CB 2.0 server.

The following test script works without errors:

<?php

$cb = new Couchbase('localhost:8091');

$string = '{"ent_seq":"1000000","r_ele":[{"reb":"\u30fd"},{"reb":"\u304f\u308a\u304b\u3048\u3057"}],"sense":[{"pos":["&n;"],"gloss":[{"lang":"en","gend":null,"value":"repetition mark in katakana"},{"lang":"ger","gend":null,"value":"(n) Wiederholung"},{"lang":"ger","gend":null,"value":"Refrain"}]}]}';
$cb->set('strangekey', $string);


var_dump($cb->get('strangekey'));
?>

Taylor, is this still an issue for you? I suppose this has been fixed in the latest releases.
Comment by Matt Ingenthron [ 05/Sep/12 ]
appears to be fixed
Generated at Fri Oct 24 05:03:48 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.