Problem Statement
When a contentlet containing an indexable attribute with a String[] value (e.g., categoryperms) is published, the catchall field in the Elasticsearch/OpenSearch index receives the raw Java object reference ([Ljava.lang.String;@<hashcode>) instead of the actual array elements joined as searchable terms.
Root cause: In ESMappingAPIImpl.java at line 600, the value is appended to the catchall StringBuilder without checking whether it is a String[]. When it is, StringBuilder.append(Object) calls .toString() on the array, which produces the Java reference representation rather than the element values.
Observed in: catchall field after publishing a Content (Generic) contentlet from the empty starter:
... notassigned [Ljava.lang.String;@7d0c268b true ...
Expected: The actual permission category values (the array elements) should appear in catchall as space-separated terms.
This does not appear to have been reported by customers, but the bug is reproducible locally and is provably broken in the current codebase.
Steps to Reproduce
- Start a dotCMS instance with the empty starter.
- Open the Content portlet and find a
Content (Generic) contentlet.
- Publish the contentlet.
- Open the OpenSearch Dashboard and query the
catchall field for that contentlet's identifier.
- Observe that the
catchall value contains a token matching [Ljava.lang.String;@<hashcode> — this is the categoryperms field value serialized as a Java object reference.
Expected result: The categoryperms values appear as readable string tokens in catchall.
Actual result: The value appears as [Ljava.lang.String;@<hashcode>.
Acceptance Criteria
dotCMS Version
Reproducible on latest main branch (confirmed 2026-06-18).
Severity
Medium - Some functionality impacted
Links
Problem Statement
When a contentlet containing an indexable attribute with a
String[]value (e.g.,categoryperms) is published, thecatchallfield in the Elasticsearch/OpenSearch index receives the raw Java object reference ([Ljava.lang.String;@<hashcode>) instead of the actual array elements joined as searchable terms.Root cause: In
ESMappingAPIImpl.javaat line 600, the value is appended to the catchallStringBuilderwithout checking whether it is aString[]. When it is,StringBuilder.append(Object)calls.toString()on the array, which produces the Java reference representation rather than the element values.Observed in:
catchallfield after publishing aContent (Generic)contentlet from the empty starter:Expected: The actual permission category values (the array elements) should appear in
catchallas space-separated terms.This does not appear to have been reported by customers, but the bug is reproducible locally and is provably broken in the current codebase.
Steps to Reproduce
Content (Generic)contentlet.catchallfield for that contentlet's identifier.catchallvalue contains a token matching[Ljava.lang.String;@<hashcode>— this is thecategorypermsfield value serialized as a Java object reference.Expected result: The
categorypermsvalues appear as readable string tokens incatchall.Actual result: The value appears as
[Ljava.lang.String;@<hashcode>.Acceptance Criteria
String[]attribute (e.g.,categoryperms) results in thecatchallES field containing the actual array element values as space-separated tokens — not a Java object reference.Content (Generic)→ inspectcatchallin OpenSearch Dashboard → see[Ljava.lang.String;@...) no longer reproduces.catchallfield (existing behavior per Javadoc inESMappingAPIImplis preserved — no regression).ESMappingAPIImplpass without modification.dotCMS Version
Reproducible on latest
mainbranch (confirmed 2026-06-18).Severity
Medium - Some functionality impacted
Links
ESMappingAPIImpl.java#L600