> Long and nice explanation :)
That's what
I was going to say. Exactly what I was looking for
Thanks Eduard, I'll follow your algorithm :)
> I hope this is also available online on
xwiki.org
somewhere since it can be useful to others too ;)
This particular mail can be
copy/pasted into Admin application for several iterations until 3.5 becomes deprecated.
Page something like
[[Annotations Check>>AnnotationsCheck]]: Tool to check if annotation migration
[[XWIKI-YYYY>>]] has been performed properly
-----Original Message-----
From: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] On Behalf Of Vincent
Massol
Sent: Thursday, November 08, 2012 14:28 PM
To: XWiki Users
Subject: Re: [xwiki-users] Annotations-comments merge validation
Hi Edy,
Long and nice explanation :)
I hope this is also available online on
xwiki.org somewhere since it can be useful to
others too ;)
Thanks
-Vincent, trying to have the max people following the
http://dev.xwiki.org/xwiki/bin/view/Community/Contributing#HStrategiesforan…
strategy to improve
xwiki.org ;)
On Nov 8, 2012, at 12:48 PM, Eduard Moraru <enygma2002(a)gmail.com> wrote:
Hi Roman,
The 4.1.3 release had a couple of problems [1], including one that
unintentionally skipped the annotations migration. The 4.1.4 release
fixed this problem [2], amongst others, and it would be what I
recommend you to use instead of 4.1.3.
I`m not sure if your case fits into the problems specific to 4.1.3
(though it probably does), but to test if you have annotations that
respect the new format, you could run this piece of velocity code:
{{velocity}}
New annotations: $services.query.hql(", BaseObject comment,
BaseProperty selection WHERE comment.name=doc.fullName AND
comment.className='XWiki.XWikiComments' AND selection.id.id=comment.id
AND
selection.name='selection'").execute()
Old annotations: $services.query.hql(", BaseObject annotation WHERE
annotation.name=doc.fullName AND
annotation.className='AnnotationCode.AnnotationClass'").execute()
{{/velocity}}
It will list the documents that contain annotations in the new format
and documents that contain annotations in the old format (not migrated).
Basically the new format is XWiki.XWikiComments class instead of the
old AnnotationCode.AnnotationClass, with the addition that the
XWikiComments objects also have the "selection" property set to
whatever was selected when the annotation was made.
If it turns out that you have old annotations, then you need to check
2
things:
1) That you were not using a custom annotations class before the
upgrade, that is a class that is different from
AnnotationsCode.AnnotationsClass
2) That you are not using a custom mapping for the comments If you are
in one of the 2 cases above, then you will not be able to migrate to
merged annotations and comments (ad keep using annotations as
before) because the migration does not support the 2 cases. See the
Jira issue [3] on this matter for more details.
If you are not in one of the 2 cases above, then you need to upgrade
to
4.1.4 (or above) and to also force the annotations migration to run again.
To force the migration, once you have upgraded normally to 4.1.4, you
have
to:
1) set your annotations class to AnnotationCode.AnnotationClass (By
going into Administration > Applications > Annotations > XWiki class
defining annotations structure)
2) edit xwiki.cfg and specify that you want to force the annotations
migration to be executed by adding the following line:
xwiki.store.migration.force=R40001XWIKI7540
2.1) also make sure that the migrations process itself is enabled
(xwiki.store.migration=1) and that it is enabled for all your wikis if
you are in a miltiwiki environment
(xwiki.store.migration.databases=all)
3) restart your wiki and watch the logs as the migration should report
that it is being executed
4) check the results by running the velocity script from the first
part of my mail.
5) set your annotations class to XWiki.XWikiComments since this is
what you will be using from now on
5.1) you should also hide the annotations tab, if you did not already
do so, by going to "Administration > Look & Feel > Page Elemetns >
Show document annotations" and selecting "No".
6) edit xwiki.cfg and remove or comment the forced migration line to
avoid problems.
Hope this helps,
Eduard
----------
[1]
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnte
rprise413
[2]
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnte
rprise414#HR40001XWIKI7540migrationbeingskippedunintentionallyin4.1.3
[3]
http://jira.xwiki.org/browse/XWIKI-8036
On Thu, Nov 8, 2012 at 10:45 AM, Roman Muntyanu
<rmuntyan(a)softserveinc.com>wrote;wrote:
Hello,
I'm trying to validate if upgrade where annotations have been merged
with comments was successful (3.5->4.1.3).
select * from xwikicomments;
returns me 0 records, even though I definitely have page where I
have annotations and I as well see them as comments in the bottom of the page.
How can I check if annotations are where they should be?
Regards,
Roman
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users