This issue has been created
There are 4 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-29deb3a5-edcb-40f6-b347-4344e4887c2d XWIKI-25608 Open

Repository /extensions/{extensionId} REST endpoint fails with a 500 error for extensions using version pages

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-37d90539-88e7-40f5-a875-3ec368d94e77 Simon Urli created this issue on 29/Oct/26 09:19
 
Summary: Repository /extensions/{extensionId} REST endpoint fails with a 500 error for extensions using version pages
Issue Type: cid:jira-generated-image-avatar-29deb3a5-edcb-40f6-b347-4344e4887c2d Bug
Affects Versions: 17.9.0-rc-1
Assignee: Unassigned
Components: Repository
Created: 29/Oct/26 09:19
Labels: regression
Priority: cid:jira-generated-image-static-major-bd5e61e1-83e9-48b0-bc92-b01282043435 Major
Reporter: Simon Urli
Description:

Steps to reproduce

  1. Request the REST resource of an extension whose versions are stored in dedicated version pages, without a version: e.g. https://extensions.xwiki.org/xwiki/rest/repository/extensions/org.xwiki.platform:xwiki-platform-image-style-rest

Expected results

The extension metadata (id, name, summary, authors, properties, etc.) is returned, as it is for extensions which don't use version pages (e.g. https://extensions.xwiki.org/xwiki/rest/repository/extensions/org.xwiki.contrib:application-xambox).

Actual results

An HTTP 500 error is returned:

jakarta.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalArgumentException: An Entity Reference name cannot be null or empty

Analysis

ExtensionRESTResource calls AbstractExtensionRESTResource#createExtension(extensionDocument, null), a null version meaning "no specific version". Since XWIKI-14136, createExtension always starts by resolving the version document with ExtensionStore#getExtensionVersionDocument(extensionDocument, version, xcontext). When the extension uses version pages, that builds a PageReference named after the version, which fails for a null version. The version document is only needed for the dependencies, which are only computed when a version is given, so it should only be resolved in that case.

Regression introduced by XWIKI-14136 (same origin as XWIKI-23996, which fixed the /extensions listing). The endpoint is not used by the XWiki extension repository client, so this only affects direct REST users. Found while investigating XWIKI-25602.

 
 

4 updates

 
cid:jira-generated-image-avatar-37d90539-88e7-40f5-a875-3ec368d94e77 Changes by Simon Urli on 29/Oct/26 09:20
 
Fix Version: 17.10.15
Fix Version: 18.10.0-rc-1
Fix Version: 18.4.8
Priority: Major Blocker