There are 2 updates.
 
 
Release Notes Application / cid:jira-generated-image-avatar-de27a7cc-ad9b-4e40-8f44-825524ec6916 RN-90 Open

The application cannot be copied to another top-level space, although its pages resolve that space at runtime

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-42941b10-17cd-4e7a-85bc-8e62b949fde0 Changes by Vincent Massol on 01/Sep/26 08:50
 
Summary: Twelve pages hardcode the ReleaseNotes space prefix instead of resolving the The application cannot be copied to another top-level space , although its pages resolve that space at runtime
Description: h2. Problem

The Every page of the application is designed to be copyable/renameable to another works out at runtime which top-level space it is running in : each page resolves its own space at runtime with

{code}
#set ($topSpace = $doc.documentReference.extractFirstReference('SPACE').getName())
{code}

Twelve places do not follow it and write the literal builds its page references, XWQL statements, HTML attributes, Live Data {{ ReleaseNotes. sourceParameters }} prefix instead , links and JSX/SSX identifiers out of the answer -- 57 places across 18 pages .

*{{{}include{}}} targets The point of that is to let the application be copied or renamed to another top-level space. It does not achieve it. Three of the things a copy needs are plain xobject values that no interpolation can reach :

* the {{ WebHome XWiki.ClassSheetBinding }} ; objects on {{ Data/WebHome}} (three includes); {{ Code /HomeReleaseNotes .ContributorsClass }} ; and {{Code /HomeReleaseChanges}}; {{Code/ . Change /ReleaseNotesChangesMacro .ChangeClass }} ; , naming {{ ReleaseNotes. Code /Change/ChangeDisplayerSimple .ContributorsSheet }} , and {{ ChangeDisplayerList}}, {{ChangeDisplayerFlow}}, {{ChangeDisplayerGrid}}; {{ ReleaseNotes. Code / . Change / . ChangeSheet}} . ;

* Live Data suggest URLs* (inside {{ XWiki Code . JavaScriptExtension ReleaseNotesConfig }} objects with , whose {{ parse=1 template }} ): and {{ Code/HomeReleaseNotes configurationClass }} (2 sites, name {{ classname= ReleaseNotes.Code. ReleaseNoteClass ReleaseNoteTemplate }} ) and {{ ReleaseNotes. Code /HomeCustomReport .ReleaseNotesConfigClass }} (5 sites, ;
* the
{{ classname=ReleaseNotes XWiki . Code.EntryClass UIExtensionClass }} / object on {{ Code . ..Change.ChangeClass ApplicationsPanelEntry }} ).

, whose {{ Data/WebHome target }} computes is {{ $topSpace ReleaseNotes.WebHome }} and then hardcodes the prefix eleven lines later .

h2. Consequence

A copy of therefore goes on using the application installed under another top-level space renders against the * original * space 's helper pages sheets, configuration and breaks outright applications panel entry, and stops working altogether once the original is uninstalled. The

Twelve {{include}} targets and
seven Live Data suggest URLs silently stop suggesting anything, because additionally write the literal {{ classname ReleaseNotes. }} names prefix, so they never followed a class that does not exist in the copy and the suggest endpoint returns an empty list rather than an error either .

h2.
Notes Consequence

Both shapes are fixable. The application supports exactly one install location, {{ Code/Change/DisplayChangesMacro ReleaseNotes }} already proves an {{include}} reference can be interpolated when , which is where its XAR puts it sits inside a . What {{ velocity $topSpace }} block:

actually computes is not that location but the name of whichever page is being rendered -- for { code}
{ {include reference="${topSpace}. Code.Change. ChangeDisplayer${stringtool.capitalize($displayer) ChangeSheet } "/ } }
any page carrying a { code {ChangeClass }

and
} xobject, for the JSX objects are {{ parse=1 releasenotechanges }} , so they only need their own and {{ #set ($topSpace = ...) releasenotecontributors }} macros any page that calls them . Those coincide in a normal installation and diverge otherwise, so the variable adds a way for the rendered output to vary that nothing needs.

Also worth deciding as part of this: h2. Proposal

Name
{{ GetChangesMacro ReleaseNotes }} in the references and drop {{ DisplayChangesMacro}} derive {{ $topSpace}} from {{$xcontext altogether . macro.doc}} while the other 16 pages derive it from {{$doc}}. These coincide in Supporting a single installation and diverge otherwise second install location would first need the three xobject values above to become relative ; which one until that is canonical possible the mechanism is currently unstated better absent than half-present .