[xwiki-devs] [ANN] Official docker image for XWiki on dockerhub

2017-02-08 Thread Vincent Massol
Hi everyone,

Just wanted to let you know that the XWiki docker image is now an official 
image on docker hub!

See https://hub.docker.com/r/library/xwiki/

Please try it out and let us know how it goes. That’s probably one of the 
simplest way to try XWiki now. 

It comes configured with filesystem attachment by default and libreoffice 
configured too for office imports/exports/viewing office docs.

Thanks
-Vincent

Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Sergiu Dumitriu
On 02/08/2017 10:05 AM, Thomas Mortagne wrote:
> On Wed, Feb 8, 2017 at 3:53 PM, Sergiu Dumitriu  wrote:
>> I wouldn't want to have empty revisions.
>>
>> If you want to change the import, then you can manually call
>> doc.setContentDirty(true).
> 
> "So the question is do we force metadata dirty to true all the time in
> the instance output filter"
> 
> Again the subject here is default import mode only. We are not talking
> about XWiki#saveDocument and I would be -1 to force new revision all
> the time since we have use cases for this.

Yep, and I was agreeing.

>>
>> On 02/08/2017 08:33 AM, Thomas Mortagne wrote:
>>> Hi devs,
>>>
>>> We have a unintended regression in the standard import: if what you
>>> import is identical to what is already in the database (including the
>>> author) it won't add a new version (if you use the default option "Add
>>> a new version to the existing page").
>>>
>>> What happen in practice is that if you keep calling XWikiDocument#set*
>>> methods with the same data it won't update the metadata or content
>>> dirty flags. This flags are what hibernate store look at to know if it
>>> should add a new version or not.
>>>
>>> You can reproduce the same behavior with a simple script which load a
>>> document, always set the same content and save. You will notice that
>>> the history of that document does not change.
>>>
>>> So the question is do we force metadata dirty to true all the time in
>>> the instance output filter or do we keep this feature (in which case
>>> we should optimize it a bit to not do the useless XWiki#saveDocument
>>> but that's another subject).
>>>
>>> WDYT ?
>>>
>>> It could be seen as a nice feature but in practice my first reaction
>>> was WTF and you often want to be sure the import actually did
>>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>>> current behavior if there is a majority for it.
>>>
>>
>>
>> --
>> Sergiu Dumitriu
>> http://purl.org/net/sergiu
> 
> 
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Thomas Mortagne
On Wed, Feb 8, 2017 at 3:53 PM, Sergiu Dumitriu  wrote:
> I wouldn't want to have empty revisions.
>
> If you want to change the import, then you can manually call
> doc.setContentDirty(true).

"So the question is do we force metadata dirty to true all the time in
the instance output filter"

Again the subject here is default import mode only. We are not talking
about XWiki#saveDocument and I would be -1 to force new revision all
the time since we have use cases for this.

>
> On 02/08/2017 08:33 AM, Thomas Mortagne wrote:
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu



-- 
Thomas Mortagne


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Sergiu Dumitriu
I wouldn't want to have empty revisions.

If you want to change the import, then you can manually call
doc.setContentDirty(true).

On 02/08/2017 08:33 AM, Thomas Mortagne wrote:
> Hi devs,
> 
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
> 
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
> 
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
> 
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
> 
> WDYT ?
> 
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Thomas Mortagne
On Wed, Feb 8, 2017 at 3:18 PM, Vincent Massol  wrote:
> Hi Thomas,
>
>> On 8 Feb 2017, at 14:33, Thomas Mortagne  wrote:
>>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>
> It’s hard to decide...
>
> Same as you, I also thought it was a nice feature when I learnt that this was 
> what was happening :)
>

> Actually something I’ve always wanted was to avoid generating new revisions 
> when users edit a page and click save without changing any content instead of 
> clicking cancel (a lot of users do this, generating unnecessary revisions and 
> when you’re the owner of a wiki, it’s a pain to check the diffs to find out 
> that there was no changes). But this could be a feature implemented at the 
> level of the editor save button I guess. It’s a bit different since the 
> author would be different but we wouldn’t want a save in this case.

The reason it does that is because we force it. See
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java#L160.

>
> So I’m +0 for both behaviours with a slight preference toward forcing a rev 
> to be created.
>
> Thanks
> -Vincent
>
>> --
>> Thomas Mortagne
>



-- 
Thomas Mortagne


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Guillaume Delhumeau
In that case it seems more natural to have a new revision anyway, to make
sure it has been imported correctly.

2017-02-08 15:43 GMT+01:00 Thomas Mortagne :

> The idea right now is only to discuss import use case, not the
> behavior of XWiki#saveDocument.
>
> On Wed, Feb 8, 2017 at 3:12 PM, Guillaume Delhumeau
>  wrote:
> > Not storing unnecessary versions looks like a feature for me.
> >
> > Imagine a scheduler job that update some pages every night, I would be
> glad
> > that it does not create new versions when nothing has changed in the end.
> >
> > Maybe I look at this with a biased vision: I know that having a lot of
> > versions of a document can cause problems (when we move the document for
> > example). If we had not this problem, maybe I would have the same opinion
> > than you.
> >
> > Thanks,
> >
> > 2017-02-08 14:33 GMT+01:00 Thomas Mortagne :
> >
> >> Hi devs,
> >>
> >> We have a unintended regression in the standard import: if what you
> >> import is identical to what is already in the database (including the
> >> author) it won't add a new version (if you use the default option "Add
> >> a new version to the existing page").
> >>
> >> What happen in practice is that if you keep calling XWikiDocument#set*
> >> methods with the same data it won't update the metadata or content
> >> dirty flags. This flags are what hibernate store look at to know if it
> >> should add a new version or not.
> >>
> >> You can reproduce the same behavior with a simple script which load a
> >> document, always set the same content and save. You will notice that
> >> the history of that document does not change.
> >>
> >> So the question is do we force metadata dirty to true all the time in
> >> the instance output filter or do we keep this feature (in which case
> >> we should optimize it a bit to not do the useless XWiki#saveDocument
> >> but that's another subject).
> >>
> >> WDYT ?
> >>
> >> It could be seen as a nice feature but in practice my first reaction
> >> was WTF and you often want to be sure the import actually did
> >> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> >> current behavior if there is a majority for it.
> >>
> >> --
> >> Thomas Mortagne
> >>
> >
> >
> >
> > --
> > Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
> > Research & Development Engineer at XWiki SAS
> > Committer on the XWiki.org project
>
>
>
> --
> Thomas Mortagne
>



-- 
Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Thomas Mortagne
The idea right now is only to discuss import use case, not the
behavior of XWiki#saveDocument.

On Wed, Feb 8, 2017 at 3:12 PM, Guillaume Delhumeau
 wrote:
> Not storing unnecessary versions looks like a feature for me.
>
> Imagine a scheduler job that update some pages every night, I would be glad
> that it does not create new versions when nothing has changed in the end.
>
> Maybe I look at this with a biased vision: I know that having a lot of
> versions of a document can cause problems (when we move the document for
> example). If we had not this problem, maybe I would have the same opinion
> than you.
>
> Thanks,
>
> 2017-02-08 14:33 GMT+01:00 Thomas Mortagne :
>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>> --
>> Thomas Mortagne
>>
>
>
>
> --
> Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
> Research & Development Engineer at XWiki SAS
> Committer on the XWiki.org project



-- 
Thomas Mortagne


Re: [xwiki-devs] New contrib repository and Jira project for the Tooltip Macro extention

2017-02-08 Thread Raluca Stavro
Nevermind, the repository and the Jira project are already put in place.

Raluca.

On Wed, Feb 8, 2017 at 4:26 PM, Raluca Stavro  wrote:

> Hello,
>
> Can someone please create the repository and the Jira project for the Tooltip
> Macro 
> extention ? At this point, it can't be installed with EM and we need to do
> some adjustments to this macro.
>
> Repository name : macro-tooltip
> Jira project name : MTOOLTIP
>
> Thank you,
> Raluca.
>


Re: [xwiki-devs] New contrib repository and Jira project for the Tooltip Macro extention

2017-02-08 Thread Vincent Massol
Hi,

> On 8 Feb 2017, at 15:26, Raluca Stavro  wrote:
> 
> Hello,
> 
> Can someone please create the repository and the Jira project for the Tooltip
> Macro 
> extention ? At this point, it can't be installed with EM and we need to do
> some adjustments to this macro.
> 
> Repository name : macro-tooltip
> Jira project name : MTOOLTIP

Already exists:
- https://github.com/xwiki-contrib/macro-tooltip
- http://jira.xwiki.org/browse/TOOLTIP

:)

Thanks
-Vincent

> Thank you,
> Raluca.



[xwiki-devs] New contrib repository and Jira project for the Tooltip Macro extention

2017-02-08 Thread Raluca Stavro
Hello,

Can someone please create the repository and the Jira project for the Tooltip
Macro 
extention ? At this point, it can't be installed with EM and we need to do
some adjustments to this macro.

Repository name : macro-tooltip
Jira project name : MTOOLTIP

Thank you,
Raluca.


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Vincent Massol
Hi Thomas,

> On 8 Feb 2017, at 14:33, Thomas Mortagne  wrote:
> 
> Hi devs,
> 
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
> 
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
> 
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
> 
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
> 
> WDYT ?
> 
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.

It’s hard to decide...

Same as you, I also thought it was a nice feature when I learnt that this was 
what was happening :)

Actually something I’ve always wanted was to avoid generating new revisions 
when users edit a page and click save without changing any content instead of 
clicking cancel (a lot of users do this, generating unnecessary revisions and 
when you’re the owner of a wiki, it’s a pain to check the diffs to find out 
that there was no changes). But this could be a feature implemented at the 
level of the editor save button I guess. It’s a bit different since the author 
would be different but we wouldn’t want a save in this case.

So I’m +0 for both behaviours with a slight preference toward forcing a rev to 
be created.

Thanks
-Vincent

> -- 
> Thomas Mortagne



Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Guillaume Delhumeau
Note that in GIT, you cannot add a file to a commit if this file has no
change.

2017-02-08 15:12 GMT+01:00 Guillaume Delhumeau <
guillaume.delhum...@xwiki.com>:

> Not storing unnecessary versions looks like a feature for me.
>
> Imagine a scheduler job that update some pages every night, I would be
> glad that it does not create new versions when nothing has changed in the
> end.
>
> Maybe I look at this with a biased vision: I know that having a lot of
> versions of a document can cause problems (when we move the document for
> example). If we had not this problem, maybe I would have the same opinion
> than you.
>
> Thanks,
>
> 2017-02-08 14:33 GMT+01:00 Thomas Mortagne :
>
>> Hi devs,
>>
>> We have a unintended regression in the standard import: if what you
>> import is identical to what is already in the database (including the
>> author) it won't add a new version (if you use the default option "Add
>> a new version to the existing page").
>>
>> What happen in practice is that if you keep calling XWikiDocument#set*
>> methods with the same data it won't update the metadata or content
>> dirty flags. This flags are what hibernate store look at to know if it
>> should add a new version or not.
>>
>> You can reproduce the same behavior with a simple script which load a
>> document, always set the same content and save. You will notice that
>> the history of that document does not change.
>>
>> So the question is do we force metadata dirty to true all the time in
>> the instance output filter or do we keep this feature (in which case
>> we should optimize it a bit to not do the useless XWiki#saveDocument
>> but that's another subject).
>>
>> WDYT ?
>>
>> It could be seen as a nice feature but in practice my first reaction
>> was WTF and you often want to be sure the import actually did
>> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
>> current behavior if there is a majority for it.
>>
>> --
>> Thomas Mortagne
>>
>
>
>
> --
> Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
> Research & Development Engineer at XWiki SAS
> Committer on the XWiki.org project
>



-- 
Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project


Re: [xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Guillaume Delhumeau
Not storing unnecessary versions looks like a feature for me.

Imagine a scheduler job that update some pages every night, I would be glad
that it does not create new versions when nothing has changed in the end.

Maybe I look at this with a biased vision: I know that having a lot of
versions of a document can cause problems (when we move the document for
example). If we had not this problem, maybe I would have the same opinion
than you.

Thanks,

2017-02-08 14:33 GMT+01:00 Thomas Mortagne :

> Hi devs,
>
> We have a unintended regression in the standard import: if what you
> import is identical to what is already in the database (including the
> author) it won't add a new version (if you use the default option "Add
> a new version to the existing page").
>
> What happen in practice is that if you keep calling XWikiDocument#set*
> methods with the same data it won't update the metadata or content
> dirty flags. This flags are what hibernate store look at to know if it
> should add a new version or not.
>
> You can reproduce the same behavior with a simple script which load a
> document, always set the same content and save. You will notice that
> the history of that document does not change.
>
> So the question is do we force metadata dirty to true all the time in
> the instance output filter or do we keep this feature (in which case
> we should optimize it a bit to not do the useless XWiki#saveDocument
> but that's another subject).
>
> WDYT ?
>
> It could be seen as a nice feature but in practice my first reaction
> was WTF and you often want to be sure the import actually did
> something so I'm +1 to force metadata dirty. But I'm +0 to keep the
> current behavior if there is a majority for it.
>
> --
> Thomas Mortagne
>



-- 
Guillaume Delhumeau (guillaume.delhum...@xwiki.com)
Research & Development Engineer at XWiki SAS
Committer on the XWiki.org project


[xwiki-devs] So what do we do about https://jira.xwiki.org/browse/XWIKI-14016

2017-02-08 Thread Thomas Mortagne
Hi devs,

We have a unintended regression in the standard import: if what you
import is identical to what is already in the database (including the
author) it won't add a new version (if you use the default option "Add
a new version to the existing page").

What happen in practice is that if you keep calling XWikiDocument#set*
methods with the same data it won't update the metadata or content
dirty flags. This flags are what hibernate store look at to know if it
should add a new version or not.

You can reproduce the same behavior with a simple script which load a
document, always set the same content and save. You will notice that
the history of that document does not change.

So the question is do we force metadata dirty to true all the time in
the instance output filter or do we keep this feature (in which case
we should optimize it a bit to not do the useless XWiki#saveDocument
but that's another subject).

WDYT ?

It could be seen as a nice feature but in practice my first reaction
was WTF and you often want to be sure the import actually did
something so I'm +1 to force metadata dirty. But I'm +0 to keep the
current behavior if there is a majority for it.

-- 
Thomas Mortagne