| xwiki.properties advertises two URL properties as replacements for older xwiki.cfg ones:
- url.standard.hideViewAction — "Note that this replaces the old xwiki.showviewaction property in the xwiki.cfg file." (xwiki.properties.vm:1034-1039, since 7.2M1)
- url.standard.entityPathPrefix — "Note that this replaces the old xwiki.defaultservletpath property in the xwiki.cfg file." (xwiki.properties.vm:1017-1024, since 5.2M1)
Neither statement is true of the running product. 1. url.standard.hideViewAction is read by nothing StandardURLConfiguration.isViewActionHidden() has no caller in main code. The only occurrences in the whole platform are the interface, DefaultStandardURLConfiguration, LegacyStandardURLConfiguration and two comments in AbstractEntityResourceReferenceResolver. A scan of every jar in a shipped WEB-INF/lib (18.9.0) finds the symbol only in xwiki-platform-url-scheme-standard and xwiki-platform-legacy-url, i.e. the declaring classes. Its last caller was removed by 52dfa89f801 (XWIKI-12842, "Improve URL backward-compatibility after introduction of Nested Spaces", 2015-11-20, 7.4), which replaced the conditional parsing with the unconditional one that is there today. The property has had no effect since. What actually decides whether view appears in a generated URL is XWikiServletURLFactory.addAction() calling XWiki.showViewAction() (XWiki.java:7184-7194), which reads the XWikiPreferences field showviewaction and then xwiki.cfg's xwiki.showviewaction (default 1). 2. url.standard.entityPathPrefix only affects parsing getEntityPathPrefix() has exactly one consumer in main code, StandardStringResourceTypeResolver:60, which decides whether an incoming path segment introduces an entity path. Generated URLs come from XWiki.getServletPath() (XWiki.java:5688-5699): xwiki.servletpath, falling back to xwiki.defaultservletpath when the request path does not start with /bin. So the property changes which URLs XWiki accepts, never the ones it emits — it does not replace xwiki.defaultservletpath. Steps to reproduce On a 18.9.0 standalone distribution, counting the links the home page generates:
- stock configuration: 37
- url.standard.hideViewAction=true in xwiki.properties + restart: 37 (no change)
- xwiki.showviewaction=0 in xwiki.cfg + restart: 0 — links become /xwiki/bin/Sandbox/, while edit links correctly keep their action
|