Problem Statement
The /api/v1/configuration/config REST endpoint returns feature flag values as native JSON booleans (true/false) for FEATURE_FLAG_* keys. However, DotPropertiesService.getFeatureFlag() only compared the returned value as a string (value === 'true'), so when the API returned a boolean true, the strict comparison true === 'true' evaluated to false.
This caused the Style Editor form tab in the Content Type Builder to be permanently hidden, even when FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGES was enabled on the backend.
Impact: Any feature relying on getFeatureFlag() is broken when the backend returns a JSON boolean instead of a string — silently disabling the feature with no error or warning.
Affected flags:
FEATURE_FLAG_UVE_STYLE_EDITOR
FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGES
Browser: N/A (logic bug in Angular service).
Steps to Reproduce
- Enable
FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGES on the backend (via dotmarketing-config.properties or admin).
- Open the Content Type Builder in the dotCMS admin UI.
- Observe: the Style Editor form tab is not visible, even though the flag is enabled.
Root cause (code):
// Before fix — only handles string "true"
getFeatureFlag(key: FeaturedFlags): Observable<boolean> {
return this.getKey(key).pipe(
map((value) => (value === FEATURE_FLAG_NOT_FOUND ? true : value === 'true'))
);
}
When /api/v1/configuration/config returns { "FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGES": true } (boolean), the comparison true === 'true' is false, so the flag is treated as disabled.
Acceptance Criteria
dotCMS Version
Latest main branch
Severity
High - Major functionality broken
Links
NA
Problem Statement
The
/api/v1/configuration/configREST endpoint returns feature flag values as native JSON booleans (true/false) forFEATURE_FLAG_*keys. However,DotPropertiesService.getFeatureFlag()only compared the returned value as a string (value === 'true'), so when the API returned a booleantrue, the strict comparisontrue === 'true'evaluated tofalse.This caused the Style Editor form tab in the Content Type Builder to be permanently hidden, even when
FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGESwas enabled on the backend.Impact: Any feature relying on
getFeatureFlag()is broken when the backend returns a JSON boolean instead of a string — silently disabling the feature with no error or warning.Affected flags:
FEATURE_FLAG_UVE_STYLE_EDITORFEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGESBrowser: N/A (logic bug in Angular service).
Steps to Reproduce
FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGESon the backend (viadotmarketing-config.propertiesor admin).Root cause (code):
When
/api/v1/configuration/configreturns{ "FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGES": true }(boolean), the comparisontrue === 'true'isfalse, so the flag is treated as disabled.Acceptance Criteria
DotPropertiesService.getKey()return type is updated toObservable<string | boolean>to match the actual API contractgetFeatureFlag()returnstruewhen the API returns booleantruegetFeatureFlag()returnsfalsewhen the API returns booleanfalsegetFeatureFlag()continues to returntruefor string"true"(backward compatibility)getFeatureFlag()continues to returnfalsefor string"false"(backward compatibility)getFeatureFlag()returnstruewhen the key is not found (FEATURE_FLAG_NOT_FOUNDsentinel behavior preserved)FEATURE_FLAG_UVE_STYLE_EDITOR_FOR_TRADITIONAL_PAGESis enabled on the backendtrue, booleanfalse, string"true", string"false", and not-found casesdotCMS Version
Latest
mainbranchSeverity
High - Major functionality broken
Links
NA