This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-682dba0d-6d7d-4cb8-9279-89df1276bd49 XWIKI-25263 Open

Move getLocalReferenceMaxLength() from XWikiDocument to XWiki

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-9eeac15b-2f71-44f9-8b37-d93fb77c63ef Vincent Massol created this issue on 11/Oct/26 18:16
 
Summary: Move getLocalReferenceMaxLength() from XWikiDocument to XWiki
Issue Type: cid:jira-generated-image-avatar-682dba0d-6d7d-4cb8-9279-89df1276bd49 Improvement
Affects Versions: 11.4
Assignee: Unassigned
Components: Old Core
Created: 11/Oct/26 18:16
Priority: cid:jira-generated-image-static-major-d2960a38-0b2b-46a5-8d3e-eb8b638529ab Major
Reporter: Vincent Massol
Description:

XWikiDocument#getLocalReferenceMaxLength() and its script counterpart Document#getLocalReferenceMaxLength() (used as $doc.localReferenceMaxLength) return the maximum length of a document local reference, i.e. the size of the database column storing a document's full name. This limit comes from the store and is the same for every document of a wiki, so it shouldn't be exposed on the document.

Proposal:

  • Add XWiki#getDocumentLocalReferenceMaxLength(XWikiContext) and its script API counterpart $xwiki.getDocumentLocalReferenceMaxLength(), next to getDocumentTitleMaxLength() added by XWIKI-14197.
  • Deprecate XWikiDocument#getLocalReferenceMaxLength() and Document#getLocalReferenceMaxLength() in favor of them, and move them to the legacy modules.
  • Migrate the callers (createinline.vm, XWiki#prepareDocumentForSave, CreateActionRequestHandler#isDocumentPathTooLong).

See the discussion on https://github.com/xwiki/xwiki-platform/pull/6489

 
 

2 updates

 
cid:jira-generated-image-avatar-9eeac15b-2f71-44f9-8b37-d93fb77c63ef Changes by Vincent Massol on 11/Oct/26 18:16
 
Fix Version: 18.9.0-rc-1
Assignee: Vincent Massol