Changes for page How to Customize XWiki Without Creating Upgrade Problems
Last modified by Agnease on 2026/05/26 11:00
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - xwiki-custom-development1 +How to Customize XWiki Without Creating Upgrade Problems - Content
-
... ... @@ -11,10 +11,11 @@ 11 11 </div> 12 12 </div> 13 13 14 - <h1 id="hero-title"> HowtocustomizeXWiki safelywithout creatingupgradeproblems</h1>14 + <h1 id="hero-title">Why XWiki custom development needs structure, documentation and upgrade awareness</h1> 15 15 16 16 <p class="resource-summary"> 17 - Custom code does not have to make XWiki fragile. The real risk is unmanaged customization, not customization itself. 17 + XWiki can be adapted to complex business needs. The important part is to keep custom work documented, 18 + versioned and easy to validate during future upgrades. 18 18 </p> 19 19 </div> 20 20 </section> ... ... @@ -22,207 +22,297 @@ 22 22 <section class="resource-page"> 23 23 <div class="container"> 24 24 <div class="resource-layout"> 26 + <aside class="resource-sidebar" aria-label="Page summary"> 27 + <h4>In this guide</h4> 28 + <ul> 29 + <li><a href="#why-customize">Why customize XWiki</a></li> 30 + <li><a href="#where-risk-appears">Where risk appears</a></li> 31 + <li><a href="#safe-model">Safe model</a></li> 32 + <li><a href="#upgrade-validation">Upgrade validation</a></li> 33 + <li><a href="#practical-checklist">Checklist</a></li> 34 + <li><a href="#strategic-advantage">Strategic advantage</a></li> 35 + <li><a href="#custom-development-faq">FAQ</a></li> 36 + </ul> 37 + </aside> 25 25 26 26 <article class="resource-content"> 27 27 28 28 <p> 29 - XWikiisoften selectedbecause it canadapt torealbusinessprocesses.Teamscan startwithstandard wiki30 - features, then addstructuredpages, templates,dashboards,workflows,PDF exports, integrations,macros,31 - UI extensionsorJavacomponentswhentheorganizationneedsmore thangenericcontentediting.42 + Many organizations choose XWiki because it can grow beyond a simple documentation space. A platform may start 43 + with pages, attachments and permissions, then evolve into structured applications, approval workflows, custom 44 + dashboards, branded PDF exports, integrations or internal tools built around the company’s real processes. 32 32 </p> 33 33 34 34 <p> 35 - This flexibility is a major advantage, but it also creates a common concern: if the platform is customized too 36 - much, will future upgrades become expensive or risky? The answer depends less on how much customization exists 37 - and more on how that customization is designed, tracked, documented and tested. 48 + This flexibility is valuable, but it also raises a legitimate concern: will custom development make upgrades 49 + harder? The answer depends less on the existence of custom code and more on the way it is organized. A controlled 50 + customization can remain stable for years. An undocumented change applied directly in production can become a 51 + maintenance problem after the next upgrade. 38 38 </p> 39 39 40 40 <div class="resource-note"> 41 41 <p> 42 - <strong>The main point:</strong> custom development is not the problem. Uncontrolled custom development is. 43 - When delivered in a controlled way, custom XWiki features can remain stable across multiple upgrades. 56 + <strong>In practice:</strong> XWiki custom development should be separated from standard platform pages, 57 + documented, kept under source control, tested on staging and reviewed during upgrades. This makes custom 58 + features easier to maintain instead of turning them into hidden dependencies. 44 44 </p> 45 45 </div> 46 46 47 - <h2 id="why-customize">Why organizations customize XWiki</h2> 48 - 49 49 <p> 50 - Many organizationscanuseXWikisuccessfullywith standardfeatures.Butproductionplatforms oftenevolve51 - beyond genericpagesandspaces.Theyneedtoreflect internal processes,compliancerequirements,document52 - governance,reportingneedsorintegrationswith other businesssystems.63 + XWiki custom development is the process of adapting the platform with custom pages, classes, objects, sheets, 64 + templates, scripts, macros, UI extensions, Java components or integrations. The goal is to support real 65 + business processes while keeping the instance understandable, maintainable and upgrade-aware. 53 53 </p> 54 54 55 - <p>Typical XWiki customizations include:</p> 68 + <div class="resource-note"> 69 + <p> 70 + <strong>The main point:</strong> custom code is not the problem. Uncontrolled custom code is. XWiki can be 71 + customized safely when changes are separated from standard pages, tracked, documented and tested. 72 + </p> 73 + </div> 56 56 57 - <ul> 58 - <li>custom document metadata, classes, sheets and templates</li> 59 - <li>structured applications for internal processes</li> 60 - <li>approval workflows and controlled document lifecycles</li> 61 - <li>custom dashboards, reports and LiveData views</li> 62 - <li>branded PDF exports and document templates</li> 63 - <li>UI extensions, panels, macros and page actions</li> 64 - <li>integrations with authentication, storage, CRM, ticketing or AI systems</li> 65 - <li>scheduled jobs, notifications and automation</li> 66 - </ul> 75 + <h2 id="why-customize">Why XWiki custom development exists</h2> 67 67 68 68 <p> 69 - Avoiding all customization can create hidden costs: manual workarounds, duplicated tools, weak adoption and 70 - processes that remain outside the knowledge platform. The goal is not to customize everything. The goal is to 71 - customize the right things in a maintainable way. 78 + Avoiding all customization may look safer at first, but it can create other costs. Users may start maintaining 79 + side spreadsheets, sending approvals by email, duplicating data in external tools or bypassing the wiki because 80 + it does not match their daily work. In these cases, a well-designed XWiki customization can simplify the process 81 + and improve adoption. 72 72 </p> 73 73 74 - <h2 id="customization-risks">Where customization becomes risky</h2> 75 - 76 76 <p> 77 - XWiki makes it easy to add logic in wiki pages, Velocity scripts, Groovy scripts, templates, panels, macros, 78 - UI extensions and Java components. That power needs discipline. A customization becomes risky when nobody can 79 - quickly explain where it is implemented, why it exists and how it should be validated after an upgrade. 85 + Typical examples include custom metadata for documents, templates for recurring content, dashboards for teams, 86 + approval flows, notifications, PDF layouts, page actions, UI extensions, macros and integrations with systems 87 + such as authentication providers, ticketing tools, storage services, CRM platforms or AI assistants. These 88 + features can be implemented at different levels, from wiki pages and scripts to packaged Java extensions. 80 80 </p> 81 81 82 - < p>Commonwarningsigns include:</p>91 + <h2 id="where-risk-appears">Where customization becomes risky</h2> 83 83 84 - <ul> 85 - <li>business logic mixed directly into regular content pages</li> 86 - <li>standard XWiki pages modified without documentation</li> 87 - <li>important scripts existing only in production</li> 88 - <li>no source control or release history for custom code</li> 89 - <li>hardcoded users, groups, page names, URLs or workflow states</li> 90 - <li>custom features missing from upgrade validation plans</li> 91 - <li>urgent fixes applied in production and never cleaned up later</li> 92 - </ul> 93 + <p> 94 + Problems usually appear when nobody can quickly explain where a customization is implemented, why it exists or 95 + how it should be tested. Business logic mixed into regular content pages, standard pages changed without notes, 96 + scripts that exist only in production, hardcoded group names or missing upgrade checks are common signs that the 97 + customization process needs more structure. 98 + </p> 93 93 94 - <h2 id="safe-model">A safer model for XWiki custom development</h2> 100 + <p> 101 + This is especially important in XWiki because custom logic can live in several places: classes, objects, sheets, 102 + templates, Velocity or Groovy scripts, panels, UI extensions, macros, scheduled jobs and Java components. The 103 + flexibility is useful, but each important customization should have a clear location and a clear maintenance 104 + path. 105 + </p> 95 95 96 - <h3>1. Separate custom code from standard XWiki pages</h3> 97 97 <p> 98 - Custom pages, classes, templates, scripts and configuration should usually live in dedicated technical spaces, 99 - such as a company-specific <code>Code</code>, <code>Applications</code>, <code>Templates</code> or 100 - <code>Config</code> area. This keeps the difference between standard distribution content and company-specific 101 - logic clear during upgrades. 108 + Customizations should also be reviewed as part of the wider platform risk model. See 109 + <a href="$xwiki.getURL('resources.xwiki-security-review')">what an XWiki security review should actually include</a> 110 + for related checks around permissions, authentication, extensions, infrastructure and operational practices. 102 102 </p> 103 103 104 - <h3>2. Document each important customization</h3> 113 + <h2 id="safe-model">A safer model for XWiki custom work</h2> 114 + 115 + <h3>1. Keep custom code separate from standard XWiki pages</h3> 105 105 <p> 106 - Every significant customization should have a short technical note: what it does, where it is implemented, who 107 - requested it, what pages or components are involved, what assumptions it makes and how it should be tested. 117 + Custom classes, scripts, templates and configuration should usually live in dedicated technical spaces, for 118 + example a company-specific <code>Code</code>, <code>Applications</code>, <code>Templates</code> or 119 + <code>Config</code> area. This makes it easier to see what belongs to the standard distribution and what belongs 120 + to the organization. 108 108 </p> 109 109 110 - <h3> 3.Trackwiki-basedcustomizations</h3>123 + <h3>2. Document the purpose, not only the implementation</h3> 111 111 <p> 112 - ManypracticalfeaturescanbebuiltdirectlyinthewikiusingXWiki classes, objects,sheets,templates,113 - Velocity, Groovy, UI extensionsordashboards.Theseshouldstillbegrouped, documentedandexported or114 - versionedwhentheybecomeimportantforthebusiness.125 + A short technical note is often enough: what the customization does, who uses it, where it is implemented, what 126 + assumptions it makes and what should be checked after an upgrade. This turns custom work from a hidden script 127 + into a maintainable part of the platform. 115 115 </p> 116 116 117 - <h3> 4.UseJavaextensionsforlarger orlong-term features</h3>130 + <h3>3. Keep custom code under source control</h3> 118 118 <p> 119 - When a customizationbecomescomplex,reusableorbusiness-critical,aJava extension isoftenabetter120 - lon g-termsolution.Thisis especiallyuseful foreventlisteners,customservices,reusablemacros, scheduled121 - jobs,integrations,workflowlogic,APIsoradvancedPDF export behavior.132 + Custom development should not exist only inside the production wiki. Java code, scripts, XAR packages, 133 + deployment files and templates should be stored in a source control system, such as Git. This gives the team a 134 + history of what changed, when it changed and why. 122 122 </p> 123 123 124 - <h3> 5.UseGitforseriouscustom development</h3>137 + <h3>4. Choose the right implementation level</h3> 125 125 <p> 126 - Important customizations should be stored in source control. Git makes it possible to understand what changed, 127 - when it changed, why it changed and whether the change can be safely rolled back or adapted for a new XWiki 128 - version. 139 + Many useful features can start as wiki-based customizations using XWiki classes, sheets, templates, Velocity or 140 + UI extensions. When a feature becomes complex, reusable or business-critical, packaging it as an extension is 141 + often a better long-term option. Event listeners, custom services, scheduled jobs, integrations and advanced 142 + workflow logic usually benefit from this approach. 129 129 </p> 130 130 131 - <h3> 6. Keep configuration separatefromcode</h3>145 + <h3>5. Keep configuration outside the code</h3> 132 132 <p> 133 133 Group names, target spaces, template references, email recipients, external URLs and workflow settings should 134 - not be hardcoded when they are likely to change. Configuration pages or preference objects make the solution135 - easier to ad just without editing the implementation.148 + not be hardcoded when they are likely to change. Configuration pages or preference objects make the feature 149 + easier to adapt without rewriting the implementation. 136 136 </p> 137 137 138 - <h3>7. Test custom features during every upgrade</h3> 152 + <h2 id="upgrade-validation">Validate custom features during upgrades</h2> 153 + 139 139 <p> 140 - A successful upgrade is not only one where the server starts. Custom dashboards, workflows, macros, PDF exports, 141 - notifications, integrations, permissions and scheduled jobs should be part of the validation checklist. 155 + A successful upgrade is not only one where XWiki starts and standard pages load. The upgrade plan should also 156 + include the features that make the instance specific to the organization: custom dashboards, templates, macros, 157 + workflows, permissions, notifications, PDF exports, scheduled jobs and integrations. 142 142 </p> 143 143 144 - <h2 id="tracking-checklist">Practical tracking checklist</h2> 160 + <p> 161 + For each important customization, the team should know what to test and what a successful result looks like. A 162 + staging environment or temporary clone is usually the safest place to run this validation before production is 163 + touched. 164 + </p> 145 145 166 + <p> 167 + For a broader upgrade preparation model, see 168 + <a href="$xwiki.getURL('resources.why-upgrade-xwiki')">why regular XWiki upgrades matter</a>. 169 + </p> 170 + 171 + <div class="resource-note"> 172 + <p> 173 + <strong>A practical rule:</strong> production can receive urgent fixes when necessary, but it should not become 174 + the only place where the real version of a customization exists. After the emergency, the change should be 175 + reviewed, documented and added to the normal maintenance process. 176 + </p> 177 + </div> 178 + 179 + <h2 id="practical-checklist">XWiki custom development checklist</h2> 180 + 181 + <p> 182 + A maintainable XWiki customization should be easy to locate, explain, test and update. The following checklist 183 + can be used as a starting point when reviewing existing custom work or planning a new feature. 184 + </p> 185 + 146 146 <ul class="resource-checklist"> 147 - <li>List all important custom pages, templates, sheets, macros, scripts and Java extensions.</li> 148 - <li>Identify which customizations are business-critical and which are historical or optional.</li> 149 - <li>Move technical logic into dedicated spaces instead of regular content pages where possible.</li> 150 - <li>Store Java code, scripts, XAR packages and deployment files in Git.</li> 151 - <li>Document the purpose, owner, technical location and validation steps for each customization.</li> 152 - <li>Use staging or a temporary clone to test custom features before production upgrades.</li> 153 - <li>Review hardcoded references to users, groups, spaces, page names, URLs and external systems.</li> 154 - <li>Remove obsolete customizations instead of carrying them through every upgrade cycle.</li> 155 - <li>Package larger features as extensions when they become reusable or business-critical.</li> 187 + <li>Separate custom pages, scripts and configuration from standard XWiki content.</li> 188 + <li>Document the business purpose, technical location and validation steps.</li> 189 + <li>Keep custom code and important assets under source control, for example in Git.</li> 190 + <li>Test custom features on staging before production upgrades.</li> 191 + <li>Review old customizations and remove what is no longer used.</li> 156 156 </ul> 157 157 158 - <h2 id=" delivery-process">Acontrolleddelivery process</h2>194 + <h2 id="strategic-advantage">Custom code can become a strategic advantage</h2> 159 159 160 160 <p> 161 - Custom code should be treated as part of the platform architecture, not as a temporary patch. A practical 162 - delivery process can be simple, but it should be repeatable. 197 + Many useful platform features start as custom development for one concrete need. A workflow, dashboard, 198 + integration or structured application may first solve a private business problem, then become a reusable 199 + internal component or even a public extension. This is how practical solutions often mature. 163 163 </p> 164 164 165 - <ol> 166 - <li><strong>Clarify the need:</strong> define the business problem and the users affected.</li> 167 - <li><strong>Choose the right implementation level:</strong> wiki pages, scripts, XAR package or Java extension.</li> 168 - <li><strong>Develop outside production:</strong> use a development or staging environment for non-trivial work.</li> 169 - <li><strong>Track the change:</strong> store code, scripts, configuration and documentation in a maintainable form.</li> 170 - <li><strong>Validate the behavior:</strong> test permissions, rendering, workflows, exports, jobs and integrations.</li> 171 - <li><strong>Deploy with notes:</strong> record what changed and what should be checked during future upgrades.</li> 172 - </ol> 202 + <p> 203 + The goal is not to customize everything. The goal is to customize the right parts, in a way that can be 204 + understood and maintained later. When custom work is separated, documented, versioned and tested, XWiki can stay 205 + flexible without becoming fragile. 206 + </p> 173 173 174 - <h2 id="com mon-mistakes">Commonmistakestoavoid</h2>208 + <h2 id="custom-development-faq">XWiki custom development FAQ</h2> 175 175 176 - <ul> 177 - <li><strong>Changing standard pages without a plan.</strong> Direct changes are harder to compare, explain and preserve.</li> 178 - <li><strong>Using production as the development environment.</strong> Quick fixes may be necessary, but they should be reviewed and integrated properly afterwards.</li> 179 - <li><strong>Leaving scripts undocumented.</strong> A script that nobody understands becomes a maintenance risk.</li> 180 - <li><strong>Hardcoding business assumptions.</strong> Roles, groups, spaces and external systems change over time.</li> 181 - <li><strong>Testing only standard XWiki features during upgrades.</strong> Custom behavior is often where the real upgrade risk is found.</li> 182 - </ul> 210 + <h3>Does custom development make XWiki harder to upgrade?</h3> 211 + <p> 212 + Not automatically. Custom development becomes harder to upgrade when it is undocumented, mixed with regular 213 + content, applied directly in production or missing from the upgrade validation plan. Well-organized custom work 214 + can remain maintainable across upgrades. 215 + </p> 183 183 184 - <h2 id="strategic-advantage">Custom code can become a strategic advantage</h2> 217 + <h3>Where should XWiki custom code be stored?</h3> 218 + <p> 219 + Custom wiki pages, scripts, templates and configuration should usually be kept in dedicated technical spaces. 220 + Code and important assets should also be tracked in a source control system, such as Git, so changes are not 221 + stored only in the production wiki. 222 + </p> 185 185 224 + <h3>When should an XWiki customization become an extension?</h3> 186 186 <p> 187 - Someofthe mostuseful solutionsinaplatformenvironmentstartascustom codefora realproject. A workflow,188 - dashboard,macro,integrationorstructuredapplicationmay beginasaprivateneed,then becomeareusable189 - internalproductor evena publicextension.226 + Packaging a customization as an extension is useful when the feature becomes complex, reusable, business-critical 227 + or shared across multiple instances. Java components, event listeners, scheduled jobs and integrations often 228 + benefit from an extension-based approach. 190 190 </p> 191 191 231 + <h3>What should be tested after an XWiki upgrade?</h3> 192 192 <p> 193 - This is why the question should not be whether XWiki custom development should be avoided. The better question 194 - is how to make it maintainable. When customizations are separated, documented, versioned and tested, they can 195 - help the organization build a knowledge platform that matches its real work instead of forcing users into 196 - disconnected tools and manual workarounds. 233 + Besides standard pages, the validation should include custom dashboards, templates, macros, workflows, 234 + permissions, notifications, PDF exports, scheduled jobs, integrations and any custom applications used by the 235 + organization. 197 197 </p> 198 198 238 + <h3>Why should configuration be kept outside custom code?</h3> 239 + <p> 240 + Values such as group names, target spaces, external URLs, email recipients and workflow settings can change over 241 + time. Keeping them in configuration pages or preference objects makes custom features easier to adapt without 242 + changing the implementation. 243 + </p> 244 + 245 + <div class="resource-note"> 246 + <p> 247 + Related resources: 248 + <a href="$xwiki.getURL('resources.xwiki-security-review')">what an XWiki security review should actually include</a> 249 + and 250 + <a href="$xwiki.getURL('resources.why-upgrade-xwiki')">why regular XWiki upgrades matter</a> 251 + </p> 252 + </div> 253 + 199 199 <div class="resource-cta"> 200 200 <h3>Need help reviewing XWiki customizations?</h3> 201 201 <p> 202 202 If your XWiki instance includes custom scripts, dashboards, workflows, templates, integrations or Java 203 - extensions, a customization review can help identify what is safe, what needs documentation and what should 204 - betested before the next upgrade.258 + extensions, a customization review can help identify what is safe, what needs documentation and what should be 259 + tested before the next upgrade. 205 205 </p> 206 206 <a class="btn btn-primary" href="$xwiki.getURL('contact.WebHome')">Request a customization review</a> 207 207 </div> 208 208 209 209 </article> 210 - 211 - <aside class="resource-sidebar" aria-label="Page summary"> 212 - <h4>In this guide</h4> 213 - <ul> 214 - <li><a href="#why-customize">Why customize XWiki</a></li> 215 - <li><a href="#customization-risks">Customization risks</a></li> 216 - <li><a href="#safe-model">Safe model</a></li> 217 - <li><a href="#tracking-checklist">Tracking checklist</a></li> 218 - <li><a href="#delivery-process">Delivery process</a></li> 219 - <li><a href="#common-mistakes">Common mistakes</a></li> 220 - <li><a href="#strategic-advantage">Strategic advantage</a></li> 221 - </ul> 222 - </aside> 223 - 224 224 </div> 225 225 </div> 226 226 </section> 268 + 269 + <script type="application/ld+json"> 270 + { 271 + "@context": "https://schema.org", 272 + "@type": "FAQPage", 273 + "mainEntity": [ 274 + { 275 + "@type": "Question", 276 + "name": "Does custom development make XWiki harder to upgrade?", 277 + "acceptedAnswer": { 278 + "@type": "Answer", 279 + "text": "Not automatically. Custom development becomes harder to upgrade when it is undocumented, mixed with regular content, applied directly in production or missing from the upgrade validation plan. Well-organized custom work can remain maintainable across upgrades." 280 + } 281 + }, 282 + { 283 + "@type": "Question", 284 + "name": "Where should XWiki custom code be stored?", 285 + "acceptedAnswer": { 286 + "@type": "Answer", 287 + "text": "Custom wiki pages, scripts, templates and configuration should usually be kept in dedicated technical spaces. Code and important assets should also be tracked in a source control system, such as Git, so changes are not stored only in the production wiki." 288 + } 289 + }, 290 + { 291 + "@type": "Question", 292 + "name": "When should an XWiki customization become an extension?", 293 + "acceptedAnswer": { 294 + "@type": "Answer", 295 + "text": "Packaging a customization as an extension is useful when the feature becomes complex, reusable, business-critical or shared across multiple instances. Java components, event listeners, scheduled jobs and integrations often benefit from an extension-based approach." 296 + } 297 + }, 298 + { 299 + "@type": "Question", 300 + "name": "What should be tested after an XWiki upgrade?", 301 + "acceptedAnswer": { 302 + "@type": "Answer", 303 + "text": "Besides standard pages, the validation should include custom dashboards, templates, macros, workflows, permissions, notifications, PDF exports, scheduled jobs, integrations and any custom applications used by the organization." 304 + } 305 + }, 306 + { 307 + "@type": "Question", 308 + "name": "Why should configuration be kept outside custom code?", 309 + "acceptedAnswer": { 310 + "@type": "Answer", 311 + "text": "Values such as group names, target spaces, external URLs, email recipients and workflow settings can change over time. Keeping them in configuration pages or preference objects makes custom features easier to adapt without changing the implementation." 312 + } 313 + } 314 + ] 315 + } 316 + </script> 317 + 227 227 {{/html}} 228 228 {{/velocity}}
- Agnease.Code.SEODetailsClass[0]
-
- metaDescription
-
... ... @@ -1,0 +1,1 @@ 1 +Learn how to organize XWiki custom development, scripts, extensions and templates so your platform stays easier to maintain, document and upgrade. - metaTitle
-
... ... @@ -1,0 +1,1 @@ 1 +How to Customize XWiki Without Creating Upgrade Problems | Agnease