Re: [xwiki-users] AllAttachments live table doesn't show anything

2010-04-21 Thread adoro


adoro wrote:
 
 the right comparison for Oracle would be smth like doc.fullName in not
 NULL or length(doc.fullName)  0 - tested both of them - work OK, the
 both return the list of attachments.
 


Sorry, have misstyped:

it shoud be doc.fullName is not NULL  :-)


-
Best Regards,
Alla
-- 
View this message in context: 
http://n2.nabble.com/AllAttachments-live-table-doesn-t-show-anything-tp4875907p4935583.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] AllAttachments live table doesn't show anything

2010-04-20 Thread adoro

Hi,

we had the same issue with the view “AllAttachments” from the  Main.AllDocs.  
Environment – Oracle 10.2, JDK 1.6, Tomcat.6.0 (used also OC4J). 
Tested on XE 2.1.2 – 2.1.5. All necessary pages are saved with programming
rights.

All tabs (views) worked fine but the livetable in the “Attachments”- tab was
empty. The table in “Deleted attachments”-view was filled,
in the Tree-tab (treeview) all attachments were available as well.

Environment – Oracle 10.2, JDK 1.6, Tomcat.6.0 (used also OC4J). 
Tested on XE 2.1.2 – 2.1.5

I think, I found it.

Simple query in XWiki.AllAttachmentsResults 
#set($sql = select doc.fullName, attach from XWikiDocument as doc,
XWikiAttachment as attach where attach.docId=doc.id)
$xwiki.search($sql) 
- works fine

The problem is in the clause
#if($title)
  #set($title = $title.trim().toLowerCase())
  #set($sql = and lower(doc.fullName) like '%${title}%' )
#else #set($sql = and lower(doc.fullName)  ''  ) #end,

(two single quotes after , i.e. empty string), that generates the next
sql statement:

select doc.fullName, attach from XWikiDocument as doc, XWikiAttachment as
attach where attach.docId=doc.id and lower(doc.fullName)  '' order by
attach.filename asc

This query returns 0 rows (at least against the Oracle DB) – perhaps of
well-known Oracle specific issue to treat an empty string as NULL and the
right comparison for Oracle would be smth like doc.fullName in not NULL or
length(doc.fullName)  0 - tested both of them - work OK, the both return
the list of attachments.

And if I just use instead of empty string '' blank ' ' or use as escape
characters one more set of single quotes (), the problem is solved as
well - the livetable is filled with all wiki attachments. 

Best Regards,
Alla


-
Best Regards,
Alla
-- 
View this message in context: 
http://n2.nabble.com/AllAttachments-live-table-doesn-t-show-anything-tp4875907p4931164.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] AllAttachments live table doesn't show anything

2010-04-20 Thread Colesnicov Eugen

Big thanks Adoro!
-- 
View this message in context: 
http://n2.nabble.com/AllAttachments-live-table-doesn-t-show-anything-tp4875907p4933187.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] AllAttachments live table doesn't show anything

2010-04-09 Thread Colesnicov Eugen

My config - Oracle 10.2.4, XWiki - 2.2.4. Tested on Jetty and Glassfish. NEW
Xwiki instance imported from xar-file. User is Admin (default user in a new
instance). I cannot see any attachments in a AllAttachments live table.
What's the problem?

I know that pages XWiki.AllAttachments  XWiki.AllAttachmentsResults should
save user with programming rights. Before checking AllAttachments live
table, I gave for Admin (and for XWikiAdminGroup and for user Admin)
programming rights and resaved these 2 pages - but no result. Also I tried
to re-import these 2 pages - same situation - AllAttachments live table
doesn't show anything.

As I understand, maybe problem have relation with Oracle, because I tested
on another DB (MySQL) and all is ok. XWiki schema in Oracle have full
rights, no any special options in Oracle ...

This is not a special issue with XWiki - 2.2.4, same situation (on Oracle)
exists in a previous XWiki versions too.

Maybe have some more recomendations for me.
Thanks beforehand!
-- 
View this message in context: 
http://n2.nabble.com/AllAttachments-live-table-doesn-t-show-anything-tp4875907p4875907.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] AllAttachments live table doesn't show anything

2010-04-09 Thread Guillaume Lerouge
Hi Eugen,

On Fri, Apr 9, 2010 at 10:30, Colesnicov Eugen ecolesni...@gmail.comwrote:


 My config - Oracle 10.2.4, XWiki - 2.2.4. Tested on Jetty and Glassfish.
 NEW
 Xwiki instance imported from xar-file. User is Admin (default user in a new
 instance). I cannot see any attachments in a AllAttachments live table.
 What's the problem?

 I know that pages XWiki.AllAttachments  XWiki.AllAttachmentsResults should
 save user with programming rights. Before checking AllAttachments live
 table, I gave for Admin (and for XWikiAdminGroup and for user Admin)
 programming rights and resaved these 2 pages - but no result. Also I tried
 to re-import these 2 pages - same situation - AllAttachments live table
 doesn't show anything.

 As I understand, maybe problem have relation with Oracle, because I tested
 on another DB (MySQL) and all is ok. XWiki schema in Oracle have full
 rights, no any special options in Oracle ...


Indeed, it could be an Oracle-related problem.

Do you see anything in the log that might indicate the cause of the issue?

Guillaume


 This is not a special issue with XWiki - 2.2.4, same situation (on Oracle)
 exists in a previous XWiki versions too.

 Maybe have some more recomendations for me.
 Thanks beforehand!
 --
 View this message in context:
 http://n2.nabble.com/AllAttachments-live-table-doesn-t-show-anything-tp4875907p4875907.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Guillaume Lerouge
Product Manager - XWiki SAS
Skype: wikibc
Twitter: glerouge
http://guillaumelerouge.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users