Hi,

I added a comment on issue http://jira.xwiki.org/jira/browse/XWIKI-4887,
because I found another issue that relates, IMO.

New problem is when some StringProperty fields contain character ' " '. In
this case, JSON seems to be broken as character is not escaped, as it is in
doc_title for example.

Found this in XWiki 2.2.1. I did not re-test the previous issue about
carriage-return, though.

If you prefer I can open another issue for this instead of a comment, please
let me know,

Jeremie


2010/2/12 Jeremie BOUSQUET <jeremie.bousq...@gmail.com>

> I checked, and without carriage returns it works, so I created the issue :
> http://jira.xwiki.org/jira/browse/XWIKI-4887
>
> Thanks again,
> Jeremie
>
> 2010/2/12 Sergiu Dumitriu <ser...@xwiki.com>
>
> On 02/12/2010 03:05 PM, Jeremie BOUSQUET wrote:
>> > Wow, I'm afraid I understood ...
>> >
>> > In fact I read subjects from emails, and it happens that some have ...
>> > carriage return inside :( This does not please json validator at all ...
>>
>> This is also a bug, please report it on jira.xwiki.org
>>
>> > I will correct this and see if it's better. I never though there could
>> be
>> > carriage return characters in mails subjects :(
>> >
>> > Thanks again,
>> > Jeremie
>> >
>> > 2010/2/12 Jeremie BOUSQUET<jeremie.bousq...@gmail.com>
>> >
>> >> Thanks for the link,
>> >>
>> >> No it does not seem to be happy :
>> >>
>> >> "syntax error, unexpected TINVALID at line 44
>> >> Parsing failed"
>> >>
>> >> But I don't understand what's about TINVALID, and there's nothing
>> >> noticeable for me at line 44 ... So I'm a bit confused ...
>> >>
>> >> BR,
>> >> Jeremie
>> >>
>> >> 2010/2/12 Jerome Velociter<jer...@xwiki.com>
>> >>
>> >> Hello Jeremie,
>> >>>
>> >>> On 2/12/10 2:41 PM, Jeremie BOUSQUET wrote:
>> >>>> Hello,
>> >>>>
>> >>>> I still have issues with livetables ... I'm willing to investigate,
>> but
>> >>> a
>> >>>> little help would be appreciated :)
>> >>>>
>> >>>> I'm basically wanting to show 2 fields of a custom class of mine.
>> There
>> >>> are
>> >>>> some hundreds of objects of this kind in my wiki.
>> >>>>
>> >>>> So I add the following in a page in 2.0 syntax
>> >>>>
>> >>>> {{velocity}}
>> >>>> #set($collist = [ "subject", "startdate"])
>> >>>> #set($colprops = {
>> >>>>                      "subject" : { "type" : "text" , "link":"view",
>> >>> "size" :
>> >>>> 50, "filterable": true, "sortable":true},
>> >>>>                      "startdate" :  { "type" : "text",
>> >>> "filterable":false,
>> >>>> "sortable":true}
>> >>>>                    })
>> >>>> #set($options = { "className":"My.Class",
>> >>>>                     "tagCloud":true,
>> >>>>                     "rowCount": 10 })
>> >>>>
>> >>>> #livetable("myclass" $collist $colprops $options)
>> >>>> {{/velocity}}
>> >>>>
>> >>>> This results in an empty array displayed ... If I filter by typing 3
>> to
>> >>> 4
>> >>>> letters of an existing "subject", then SOMETIMES, it displays the
>> >>> related
>> >>>> objects, but not always. Result is identical if I put the velocity
>> part
>> >>> in
>> >>>> 1.0 syntax page. Tried to play and remove most of the fields options,
>> >>> still
>> >>>> the same behaviour.
>> >>>>
>> >>>> I have retrieved the URL that generates the JSON data from the logs,
>> put
>> >>> it
>> >>>> in my browser, and it generates some JSON with 10 elements, as
>> expected.
>> >>>> There was an exception on date formatting though, so I removed the
>> >>>> "startdate" field from the list, but still the same behaviour.
>> >>>
>> >>> Can you check and make sure the JSON is valid ?
>> >>>
>> >>> You can use http://www.jsonlint.com/ for example
>> >>>
>> >>> Thanks,
>> >>> Jerome.
>> >>>
>> >>>>
>> >>>> How could I investigate this issue ? Do you think it might be related
>> to
>> >>> my
>> >>>> installation ? Because all other livetables in the wiki work well,
>> >>> except
>> >>>> some of them that are linked to custom classes (alldocs works pretty
>> >>> well).
>> >>>> Could it be some special characters in "subject" text ? ('/', '[',
>> ...
>> >>> ?)
>> >>>>
>> >>>>
>> >>>> I'm on xwiki 2.2-RC2, tomcat 6, linux RH4.
>> >>>>
>> >>>> Thanks for help,
>> >>>> Jeremie
>>
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu/
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to