Hi,

I discovered a hard to find HQL/SQL error related to the new 
ActivityStream (V2.6.1). Sometimes the activitystream did not display at 
all, with loads of threads dumped in the log.

The problem appeared to be related to specific documents, having a ' 
(single quote) in the document's name. Besides this, the problem only 
appears when displaying the pages belonging to a specific tag. More 
specifically, when the automagically crafted HQL to select the document 
contains these specific names, so the problem did not show up when 
displaying the Activity for the entire wiki, for example.

Took me hours to find and solve it, but it's a matter of minutes to repair 
it. The solution: escape page names.
In the Activity page, edit object mode, go to the Activity Macro
(something like <mywiki>/bin/edit/Main/Activity?editor=object)

look for the macro code, and change line 168:
        #set($filterClause = $filterClause + "'" + 
$colValue.replaceAll("\'", "\'\'")  + "'" )

This effectively replaces a single quote with two single quotes, which is 
the proper way of escaping for HQL.

But, altogether, I'd love it when all these obviously problematic 
characters were simply banned out from the technical/URL document name, 
this always generates hard to find problems.

Good luck,

Wouter


Wouter Boasson (MSc)
Geo-IT Research and Coordination

RIVM - National Institute for Public Health and the Environment
Expertise Centre for Methodology and Information Services

Contact information
-----------------------
RIVM
VenZ/EMI, Pb 86
t.a.v. dhr. Drs. Wouter Boasson
Postbus 1
3720 BA Bilthoven

T +31(0)302748518
F +31(0)302744456
E [email protected]
mo - th


Disclaimer RIVM 
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to