Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
11.4
-
None
-
Unknown
-
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
Attachments
Issue Links
- relates to
-
XWIKI-14197 Title fields with more than 768 characters generate errors
-
- Closed
-
-
XWIKI-16314 Force users to respect the DB limit when creating a page
-
- Closed
-