[xwiki-users] [Announcement] XWiki Enterprise 3.1.1 and XWiki Enterprise Manager 3.1.1 Released

2011-10-04 Thread Sergiu Dumitriu
The XWiki development team is proud to announce the availability of 
XWiki Enterprise 3.1.1 and XWiki Enterprise Manager 3.1.1, bugfix 
releases on the 3.1.x stable branch.

This is the first (and probably last) bugfix release for the 3.1 series. 
It contains only small bugfixes backported from the 3.2 branch, mainly 
around missing CSRF-prevention tokens, the extension manager, and build 
improvements.

See the full release notes at
http://www.xwiki.org/xwiki/bin/ReleaseNotes/ReleaseNotesXWikiEnterprise311 
for more details.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Deleting all the documents of the recycle bin of a subwiki

2011-10-04 Thread Vincent Massol
Hi Maxime,

I haven't had the time to read your email below but here's a script to delete 
documents from the recycle bin:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Empty+Trash+Bin

Thanks
-Vincent

PS: I've never tried it so don't know if it works or not but would be good to 
know…

On Oct 4, 2011, at 6:57 PM, Maxime Sinclair wrote:

> Hi,
> 
> Context: a 2.7.2 XEM farm
> 
> I'm trying to permanently suppress all the deleted docs of one of the
> wiki of the farm using a groovy script included in a page located in
> the main wiki.
> 
> This is the code. It's a draft... A db query retrieve the list of the
> deleted docs (I think it would be better to use the API to obtain this
> list), then each document is deleted using the RecycleBinStore.
> 
> def emptyDocBin(wiki) {
>  xcontext.setDatabase(wiki)
>  def workWiki = xcontext.getXWiki()
>  def query = "SELECT DISTINCT XDD_FULLNAME FROM " + wiki + ".XWIKIRECYCLEBIN"
>  def docsResult = runQuery(query)
>  if (docsResult.size() > 0) {
>for (doc in docsResult) {
>  def docName = doc.get("XDD_FULLNAME")
>  workWiki.getDeletedDocuments(docName, "", xcontext.context).each{
>println "Deleting : " + it.fullName + " - " + it.getDate() + "
> - " + it.id
>workWiki.getRecycleBinStore().deleteFromRecycleBin(
> workWiki.getDocument(it.fullName,xcontext.context),
> it.getId(),
> xcontext.context,
> true);
>  }
>}
>  }
>  xcontext.setDatabase(xcontext.getOriginalDatabase())
> }
> 
> All is working fine, a list of deleted docs is displayed BUT nothing
> is deleted and the documents are still present in the recycle bin.
> 
> In the xwiki.log, I can read this kind of "things":
> 
> 2011-10-04 18:51:43,319
> [http://www.lclh.org/bin/view/Admin/ShrinkRecycleBins?w=calife&confirmation=1]
> [http://www.lclh.org/bin/view/Admin/ShrinkRecycleBins?w=calife&confirmation=1]
> WARN  store.XWikiHibernateBaseStore   - Cleanup of session was needed:
> SessionImpl(PersistenceContext[entityKeys=[EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#6],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#11],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#12],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#32],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#33],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#1],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#36],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#37],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#4],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#34],
> EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#35]],collectionKeys=[]];ActionQueue[insertions=[]
> updates=[] deletions=[] collectionCreations=[] collectionRemovals=[]
> collectionUpdates=[]])
> 2011-10-04 18:51:43,321 [http://www.lclh.org/bin/view/Main/]
> [Statistics storing daemon] ERROR xwiki.DocumentStatsStoreItem-
> Failed to save visit statictics object [class
> com.xpn.xwiki.stats.impl.xwiki.VisitStatsStoreItem XWiki.Admin
> DJ64XAIYEJIPIXOADG9VMJ94RHOHD2U2 DJ64XAIYEJIPIXOADG9VMJ94RHOHD2U2]
> 2011-10-04 18:51:43,321 [http://www.lclh.org/bin/view/Main/]
> [Statistics storing daemon] WARN  store.XWikiHibernateBaseStore   -
> Incompatible session (null) and transaction
> (org.hibernate.transaction.JDBCTransaction@d9a754) status
> 
> Your help, ideas or other are welcome.
> 
> Maxime
> ___
> 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] Lucene: find attachement with type jpg AND some text in the page

2011-10-04 Thread Sergiu Dumitriu
On 10/04/2011 06:04 AM, Legeinfo wrote:
> Lucene:
> I try to find all jpg´s with "foo" in the page content. I only get the jpg
> or the content of a page.
>
> (jpg AND type:attachment) AND (foo)  not working
> (jpg AND type:attachment) AND (Content:foo) not working
> (jpg AND type:attachment) AND (foo and object:XWiki.XWikiContent) not
> working
>
> Suggestions?

That can't work. Lucene matches the whole query against a "document", 
where document refers to an entry in the Lucene index, not an XWiki 
Document.

Now, each attachment is indexed in its own Lucene document, and the 
content of the owner XWikiDocument of that attachment isn't included in 
the indexed text.

Another problem is that the filename isn't split on dots, so jpg won't 
match. Lucene doesn't support wildcards at the start of a search term, 
so you can't search for *.jpg either.

So, your only choice is to patch the Lucene plugin to either:
- include the list of attachments in the LDocument corresponding to an 
XDocument, but this means that the search will return not the 
attachment, but the owner document
- include the owner XDocument content in a field of the LDocument 
corresponding to the attachment, and also index the MIME type of the 
attachment in a field so that you can search for:

type:attachment AND mime:"image/jpg" AND doccontent:"foo"

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Deleting all the documents of the recycle bin of a subwiki

2011-10-04 Thread Maxime Sinclair
Hi,

Context: a 2.7.2 XEM farm

I'm trying to permanently suppress all the deleted docs of one of the
wiki of the farm using a groovy script included in a page located in
the main wiki.

This is the code. It's a draft... A db query retrieve the list of the
deleted docs (I think it would be better to use the API to obtain this
list), then each document is deleted using the RecycleBinStore.

def emptyDocBin(wiki) {
  xcontext.setDatabase(wiki)
  def workWiki = xcontext.getXWiki()
  def query = "SELECT DISTINCT XDD_FULLNAME FROM " + wiki + ".XWIKIRECYCLEBIN"
  def docsResult = runQuery(query)
  if (docsResult.size() > 0) {
for (doc in docsResult) {
  def docName = doc.get("XDD_FULLNAME")
  workWiki.getDeletedDocuments(docName, "", xcontext.context).each{
println "Deleting : " + it.fullName + " - " + it.getDate() + "
- " + it.id
workWiki.getRecycleBinStore().deleteFromRecycleBin(
 workWiki.getDocument(it.fullName,xcontext.context),
 it.getId(),
 xcontext.context,
 true);
  }
}
  }
  xcontext.setDatabase(xcontext.getOriginalDatabase())
}

All is working fine, a list of deleted docs is displayed BUT nothing
is deleted and the documents are still present in the recycle bin.

In the xwiki.log, I can read this kind of "things":

2011-10-04 18:51:43,319
[http://www.lclh.org/bin/view/Admin/ShrinkRecycleBins?w=calife&confirmation=1]
[http://www.lclh.org/bin/view/Admin/ShrinkRecycleBins?w=calife&confirmation=1]
WARN  store.XWikiHibernateBaseStore   - Cleanup of session was needed:
SessionImpl(PersistenceContext[entityKeys=[EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#6],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#11],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#12],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#32],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#33],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#1],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#36],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#37],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#4],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#34],
EntityKey[com.xpn.xwiki.doc.XWikiDeletedDocument#35]],collectionKeys=[]];ActionQueue[insertions=[]
updates=[] deletions=[] collectionCreations=[] collectionRemovals=[]
collectionUpdates=[]])
2011-10-04 18:51:43,321 [http://www.lclh.org/bin/view/Main/]
[Statistics storing daemon] ERROR xwiki.DocumentStatsStoreItem-
Failed to save visit statictics object [class
com.xpn.xwiki.stats.impl.xwiki.VisitStatsStoreItem XWiki.Admin
DJ64XAIYEJIPIXOADG9VMJ94RHOHD2U2 DJ64XAIYEJIPIXOADG9VMJ94RHOHD2U2]
2011-10-04 18:51:43,321 [http://www.lclh.org/bin/view/Main/]
[Statistics storing daemon] WARN  store.XWikiHibernateBaseStore   -
Incompatible session (null) and transaction
(org.hibernate.transaction.JDBCTransaction@d9a754) status

Your help, ideas or other are welcome.

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


Re: [xwiki-users] rename page during it's object's inline edit save?

2011-10-04 Thread Scott Serr

- "Scott Serr"  wrote:

> I have a page that is creating sub-pages with a button called "Create
> History Log."  I create the sub-page name like HistoryLog-2011-09-27
> from the current date programatically.  These sub-pages have a
> HistoryLogClass object on them which I begin editing in the inline
> editor.  During the save operation on this object, I'd like to rename
> the page if the user has changed a date property on the object.  Is
> there a way to do this?  I'd like it to work when creating a new page
> or editing and existing page with the inline editor.
> 
> Reasoning: The user is creating a HistoryLog page (with object) a few
> days after the fact, so they need to manage the date manually
> sometimes.  I like having the date in the page name, to make a unique
> and sortable page list.  The user would like to not go through the
> extra step of renaming the page manually.
> 
> Sort of like this for page creation:
> $doc.name = "HistoryLog-" + $obj.getProperty("date").getValue()
> 
> Would I need to run $doc.rename() code when editing?
> 
> Is there a clever solution?

My fall back solution is just create a sequence for the page name.
HistoryLog-1
HistoryLog-2
And then just spin through the objects for meaningful date data.

I could do away with the page per object requirement, if there was 
such thing as an inline object editor a bit more configurable than 
the object editor.  I guess you'd need a way to render it to, so 
the only way that would work is to have a sort of virtual page for 
object editing and rendering.

I might just need pointed in the right direction.

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


Re: [xwiki-users] Receive an email every hour

2011-10-04 Thread jerem
I think depending on xwiki version you use, that you can use the watchlist
feature.
Simply go to your "Forms" space, and in the space menu (top of page) choose
"watch".
Then in your own profile, in "watchlist" part, select that you want to be
notified every hour.

I think you won't receive emails only for new documents created, but also
for updated documents.
But if there is no update, you won't receive email at all.

If it does not match your need you might need to use the Scheduler
(Scheduler.WebHome) and create an hourly job to do that and do some
scripting ...

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Receive-an-email-every-hour-tp6847029p6858963.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] Watchlist email notification does not work for some users ...

2011-10-04 Thread jerem
I found how to correct the problem: I had to remove the "WatchListClass"
object from concerned users, and recreate it (with exactly same parameters).
After that, notifications are sent correctly ...
I really don't know what's the problem behind though ...

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Watchlist-email-notification-does-not-work-for-some-users-tp6855024p6858944.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] rename page during it's object's inline edit save?

2011-10-04 Thread Scott Serr

I have a page that is creating sub-pages with a button called "Create History 
Log."  I create the sub-page name like HistoryLog-2011-09-27 from the current 
date programatically.  These sub-pages have a HistoryLogClass object on them 
which I begin editing in the inline editor.  During the save operation on this 
object, I'd like to rename the page if the user has changed a date property on 
the object.  Is there a way to do this?  I'd like it to work when creating a 
new page or editing and existing page with the inline editor.

Reasoning: The user is creating a HistoryLog page (with object) a few days 
after the fact, so they need to manage the date manually sometimes.  I like 
having the date in the page name, to make a unique and sortable page list.  The 
user would like to not go through the extra step of renaming the page manually.

Sort of like this for page creation:
$doc.name = "HistoryLog-" + $obj.getProperty("date").getValue()

Would I need to run $doc.rename() code when editing?

Is there a clever solution?

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


Re: [xwiki-users] Lucene: find attachement with type jpg AND some text in the page

2011-10-04 Thread Legeinfo
*"jpg foo"~10* is working.  
http://lucene.apache.org/java/2_9_3/queryparsersyntax.html#Proximity%20Searches
Proximity Searches 

But, is there a more *attachment specific* solution?

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Lucene-find-attachement-with-type-jpg-AND-some-text-in-the-page-tp6858165p6858599.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] Lucene: find attachement with type jpg AND some text in the page

2011-10-04 Thread Legeinfo
Lucene:
I try to find all jpg´s with "foo" in the page content. I only get the jpg
or the content of a page. 

(jpg AND type:attachment) AND (foo)  not working
(jpg AND type:attachment) AND (Content:foo) not working
(jpg AND type:attachment) AND (foo and object:XWiki.XWikiContent) not
working

Suggestions?


--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Lucene-find-attachement-with-type-jpg-AND-some-text-in-the-page-tp6858165p6858165.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