On 9 Feb 2017, at 14:02, Denis Gervalle <[email protected]> wrote:
On Thu, Feb 9, 2017 at 13:55, Thomas Mortagne <[email protected]> wrote: On Thu, Feb 9, 2017 at 1:44 PM, Vincent Massol <[email protected]> wrote:
On 9 Feb 2017, at 12:14, Thomas Mortagne <[email protected]> wrote:
Rewriting the import UI is not part of the proposed options right now. If you have the time to do it, sure.
In the meantime what we have right now is that you ask to import some page and don't see anything in the page history while I think most people will expect to see a new version with an "import" comment.
That’s maybe a technical POV. From a non tech POV, users probably just expect that the content of their wiki after the import is the same as what is in the XAR.
As a long time xwiki tech user, checking the history of a page that I know was in a XAR and not seeing an entry and comment would be a WTF for me :)
Importing a XAR is quite technical now since you usually don't use that to install applications and if ever a non technical user import a XAR he will probably not even look at the history anyway. Exactly, the only very small improvement that could be made, is about the option checked. Currently it is saying “Add a new version to the existing page”, which might allow arguing about none being added. So, maybe we could write, "Add a new version to the existing page (when modified)” or anything similar. wdyt ?
Yes that could a simple low cost solution for now. Thanks -Vincent
Thanks
-Vincent
On Thu, Feb 9, 2017 at 10:25 AM, Vincent Massol <[email protected]> wrote:
On 9 Feb 2017, at 10:18, Marius Dumitru Florea <[email protected]> wrote:
If we generate a new version then the user may get confused when comparing the versions. Seeing "No changes" when comparing two consecutive versions of a page can make the user loose his trust in the diff: "There must be some change that the diff doesn't detect because otherwise I wouldn't have two versions".
I think we should keep the current behavior but we should improve the status displayed after the import. Besides the list of pages that have been imported (saved with a new version) we can have a list of pages that have been skipped (because there were no changes). Or we could mark the skipped pages distinctly in the list of imported pages. I think the users will appreciate this, especially since it allows them to see clearly what pages have really been changed by the import.
Sounds good to me. Would be nice to have some saved job logs for imports too (as we have for DW upgrades) and the info that the page was skipped would be in that log and the admin could go back to check what was done for a given import. Or something like this. But having a temporary report showing this info would already be a good first step.
Thanks -Vincent
Thanks, Marius
On Wed, Feb 8, 2017 at 3:33 PM, Thomas Mortagne <[email protected]> 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.
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne