Re: [xwiki-users] Attached Files size to 0kb after upload

2014-01-16 Thread Clemens Klein-Robbenhaar
On 01/15/2014 05:24 PM, Patrick Moens wrote:
 Thanks Clemens  Sergiu,
 
 
 Problem solved, The table space was almost full (98-99%).
 
 Now looking to migrate Xwiki 2.3 to 5.3 with a db of 20 gb. :/
 
 Any suggestion, best practice or experiences?
 

Biggest DB here has been just 10 GB ... however the main problem
was about how to find places for backups.

If possible, then I recommend copying the complete database and
try to migrate the the copy with a separate 5.3-XWiki installation.
If that works, replace the 2.3-installation with the 5.3-installation.

That way, if something went wrong, you can repeat the complete process
without bearing the actually running 2.3-instance.
 No matter how full the DB Server actually is I would recommend making
at least backups before attempting a migration over 3 major release versions.

 The main configuration change I remember is the introduction of
of the environment.permanentDirectory (in xwiki.properties).
Because this directory also contains the index for the Solr which
needs to be build after the update, expect the box to be quite
a bit busy after firing up got the first time ...


 
 2014/1/15 Sergiu Dumitriu ser...@xwiki.org
 
 On 01/15/2014 06:46 AM, Clemens Klein-Robbenhaar wrote:
 Hi Patrick,
 I'm working with a XWiki Enterprise 2.3 on tomcat and Oracle 10;

 Since 2 or 3 days, when we upload a new file to a page , the file is
 available during 1 min then the file size change to 0kb ;

 It is not directly related, but I have seen a similar effect when using
 XWiki with a mySQL DB, which had a far too small max_allowed_packet
 config on the mySQL server.
 Somehow an error was generated in the DB Server, but not properly
 propagated to the application.

 Maybe there is something similar in your case, even though the DB Server
 is different. There should be an error on the DB Server in that case.

 Hope this helps,
 Clemens

 Yes, a database error is the general cause for this kind of behavior.
 What's happening is that the document is modified in memory to have the
 right attachment, it is placed in cache, but trying to save it to the
 database fails. As long as the document (and its attachment) is still in
 the cache, it will display fine. Once the attachment is evicted from the
 cache, trying to load it from the database will fail.

 However, in a transactional database I would expect the error to abort
 the whole thing and be displayed to the user when uploading.

 --
 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


Re: [xwiki-users] Display Blog of specific Category on Main.WebHome

2014-01-16 Thread Marius Dumitru Florea
On Wed, Jan 15, 2014 at 10:26 PM, PSwamy pree...@comdata.com wrote:
 Well, I tried something using Xwiki Query Manager. Code below -

 {{velocity}}
 #set($resultDocuments = $services.query.xwql(from
 doc.object(Blog.BlogPostClass) as blog where blog.published = '1' and
 :category member of blog.category and blog.hidden = '0' and doc.web =
 'Blog').execute())
 #foreach($resultDocument in $resultDocuments)
 $resultDocument
 #end
 {{/velocity}}

 I get this below error. What is programming right and how do I enable this
 right?

I don't get this error. I get another one, because you didn't bind the
parameter value. So adding

.bindValue('category', 'Blog.News')

before executing the query fixes the problem for me. See
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HXWiki-specificextensionsinXWQLoverJPQL
for what a short form query is. As for what Programming Right is, it
controls whether users can use protected APIs  Groovy code in wiki
pages.

Hope this helps,
Marius


 Caused by: org.xwiki.query.QueryException: Full form statements requires
 programming right. Query statement = [select doc.fullName where from
 doc.object(Blog.BlogPostClass) as blog where blog.published = '1' and
 :category member of blog.category and blog.hidden = '0' and doc.web =
 'Blog'] at
 org.xwiki.query.internal.SecureQueryExecutorManager.execute(SecureQueryExecutorManager.java:88)
 at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:248) at
 org.xwiki.query.internal.ScriptQuery.execute(ScriptQuery.java:236)



 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/Display-Blog-of-specific-Category-on-Main-WebHome-tp7588653p7588665.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
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Assign user list property

2014-01-16 Thread Marius Dumitru Florea
Just put a

$doc.display('reporter', 'hidden')

somewhere in your form, after you set its value. It will generate an
hidden input field that will ensure the reporter is saved.

Hope this helps,
Marius

On Thu, Jan 16, 2014 at 12:12 AM, Kelly Steinke kstei...@steel-craft.ca wrote:
 I have a class called TaskManager with a property called Reporter that is of 
 a List of Users type. What I am trying to do is assign the current user to 
 the Reporter property when a new document is created so that the user does 
 not have to select himself from the user list control, but I would like this 
 field to also remain as read-only so the user cannot change it to someone 
 else.

 Using the following code in the TaskManagerSheet, the property gets populated 
 on new, however when it is saved it disappears (not saved into the property). 
 I have narrowed it down to the problem being the 'view' parameter in the 
 $doc.display() function which makes it readonly, however because of this it 
 is not being saved. Is there a way to set a value on new but retain a 
 read-only status

 Here is the code that I am using:

 #set ($discard = $doc.use('TaskManager.TaskManagerClass'))
 #if($doc.isNew())
 $doc.set('reporter',$context.user)
 #end
 : $doc.display('reporter', view)

 ___
 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


Re: [xwiki-users] Assign user list property

2014-01-16 Thread Kelly Steinke
Thanks Marius, I don't know why I didn't think of that works like a charm! 


- Original Message -

From: Marius Dumitru Florea mariusdumitru.flo...@xwiki.com 
To: XWiki Users users@xwiki.org 
Sent: Thursday, January 16, 2014 8:43:54 AM 
Subject: Re: [xwiki-users] Assign user list property 

Just put a 

$doc.display('reporter', 'hidden') 

somewhere in your form, after you set its value. It will generate an 
hidden input field that will ensure the reporter is saved. 

Hope this helps, 
Marius 

On Thu, Jan 16, 2014 at 12:12 AM, Kelly Steinke kstei...@steel-craft.ca 
wrote: 
 I have a class called TaskManager with a property called Reporter that is of 
 a List of Users type. What I am trying to do is assign the current user to 
 the Reporter property when a new document is created so that the user does 
 not have to select himself from the user list control, but I would like this 
 field to also remain as read-only so the user cannot change it to someone 
 else. 
 
 Using the following code in the TaskManagerSheet, the property gets populated 
 on new, however when it is saved it disappears (not saved into the property). 
 I have narrowed it down to the problem being the 'view' parameter in the 
 $doc.display() function which makes it readonly, however because of this it 
 is not being saved. Is there a way to set a value on new but retain a 
 read-only status 
 
 Here is the code that I am using: 
 
 #set ($discard = $doc.use('TaskManager.TaskManagerClass')) 
 #if($doc.isNew()) 
 $doc.set('reporter',$context.user) 
 #end 
 : $doc.display('reporter', view) 
 
 ___ 
 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 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] User's Groups and/or Conference?

2014-01-16 Thread Patrick Masson

Just wondering if there are any XWiki events out there?

Also any XWiki users in New York / New England area of the U.S.?

Thanks,
Patrick


--
|||  |  |||||  |||| |||
Patrick Masson
General Manager, Director  Secretary to the Board
Open Source Initiative
855 El Camino Real, Ste 13A, #270
Palo Alto, CA 94301
United States
Skype: massonpj
sip: osi-mas...@ekiga.net
Ph: (970) 4MASSON
Em: mas...@opensource.org mailto:mas...@opensource.org
Ws: www.opensource.org http://www.opensource.org
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Display Blog of specific Category on Main.WebHome

2014-01-16 Thread PSwamy
Thank you all for your input. Here is a snippet of code that solves my
problem. 

{{include document=Blog.BlogCode/}}
{{velocity filter=none}}
{{html clean=false wiki=true}}
#set($blogDoc = $xwiki.getDocument(Blog.Webhome))
#getBlogEntries($blogDoc $entries) 

#foreach ($entryDoc in $xwiki.wrapDocs($entries))
   #getEntryObject($entryDoc $entryObj)
   #if($entryObj.getxWikiClass().getName() == $blogPostClassname)
#set($categories = $entryObj.getProperty('category').value)
#set($first = true)
#if($categories.size()  0)
   #foreach($category in $categories)
 ## Do not indent
 #set($categoryDoc = $!xwiki.getDocument($category))
 #set($result =
$!categoryDoc.getObject(${blogCategoryClassname}).getProperty('name').value.trim())
 #if($result == 'Category1234')
   #displayEntry($entryDoc $entryObj true true)
 #end
   #end
#end
   #end
#end
{{/html}}
{{/velocity}}



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Display-Blog-of-specific-Category-on-Main-WebHome-tp7588653p7588688.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] Individual user blogs

2014-01-16 Thread PSwamy
Hello All, Can users have their own individual blogs? If yes, how can we
enable it? -Thanks. Priti. 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Individual-user-blogs-tp7588689.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] Individual user blogs

2014-01-16 Thread Kaisen
Hello,

as far as I know not. You can generate just a additional blog to a existing 
Space or create a new space for the blog.
If you create for each user a new blog with a space it will look like a user 
blog but it will also shown in the wiki blog. The only advantage I know from 
creating new blogs to the exiting wiki blog is that you can change the rights 
how can create edit and view this blog.

I will use that function to hidden some department blogs from public or limit 
rights you can add blogs to a special one 

Hope that helps 

Send from a smartphone

 Am 17.01.2014 um 00:20 schrieb PSwamy pree...@comdata.com:
 
 Hello All, Can users have their own individual blogs? If yes, how can we
 enable it? -Thanks. Priti. 
 
 
 
 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/Individual-user-blogs-tp7588689.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
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users