[xwiki-devs] Questions about migration path when documents or macros are renamed
Hi! I have two jira issues that I need to fix for 5.3: * http://jira.xwiki.org/browse/XWIKI-9558 - Rename {{workspaces /}} gadget to {{wikis /}} * http://jira.xwiki.org/browse/XWIKI-9491 - Rename "WorkspaceInformationPanel" to "WikiInformationPanel" The implementation is very trivial. In both cases I just rename a document, and in one case I only change the field "name" of the WikiMacro. But how do we handle upgrade? A: If someone has used the {{workspaces /}} macro in her content, she will not see the expected result anymore. B: If WorkspaceInformationPanel is used in a layout, should we automatically update this layout to use WikiInformationPanel? Do we consider we should let the user fix this issues herself, or should we provide an automatic solution to that? If so, how could we do? Thanks for your help, Louis-Marie.
In general, a solution is to have the old implementation wrap the new one and log some deprecation message. So you can have a {{workspaces}} macro that calls the {{wikis}} macro and also notifies the user somehow that the macro is deprecated. Hope this helps, Marius On Oct 24, 2013 1:48 PM, "Guillaume "Louis-Marie" Delhumeau" < [email protected]> wrote:
Hi!
I have two jira issues that I need to fix for 5.3: * http://jira.xwiki.org/browse/XWIKI-9558 - Rename {{workspaces /}} gadget to {{wikis /}} * http://jira.xwiki.org/browse/XWIKI-9491 - Rename "WorkspaceInformationPanel" to "WikiInformationPanel"
The implementation is very trivial. In both cases I just rename a document, and in one case I only change the field "name" of the WikiMacro.
But how do we handle upgrade? A: If someone has used the {{workspaces /}} macro in her content, she will not see the expected result anymore. B: If WorkspaceInformationPanel is used in a layout, should we automatically update this layout to use WikiInformationPanel?
Do we consider we should let the user fix this issues herself, or should we provide an automatic solution to that? If so, how could we do?
Thanks for your help, Louis-Marie. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Oct 24, 2013, at 12:47 PM, Guillaume Louis-Marie Delhumeau <[email protected]> wrote:
Hi!
I have two jira issues that I need to fix for 5.3: * http://jira.xwiki.org/browse/XWIKI-9558 - Rename {{workspaces /}} gadget to {{wikis /}} * http://jira.xwiki.org/browse/XWIKI-9491 - Rename "WorkspaceInformationPanel" to "WikiInformationPanel"
The implementation is very trivial. In both cases I just rename a document, and in one case I only change the field "name" of the WikiMacro.
But how do we handle upgrade? A: If someone has used the {{workspaces /}} macro in her content, she will not see the expected result anymore. B: If WorkspaceInformationPanel is used in a layout, should we automatically update this layout to use WikiInformationPanel?
Do we consider we should let the user fix this issues herself, or should we provide an automatic solution to that? If so, how could we do?
You must not break anything. You need to keep the old macro, deprecate it and move it to the legacy modules (if the macro is a java macro). If the macro is not a java macro, then I guess we could/should also have legacy modules for pages. Thanks -Vincent
participants (3)
-
Guillaume "Louis-Marie" Delhumeau -
Marius Dumitru Florea -
Vincent Massol