Problem Statement
DetailPageTransformerImpl validates detail pages by checking assetSubType.equals("htmlpageasset"). However, assetSubType is populated from the content type's velocity variable name (set in IdentifierFactoryImpl line 360: identifier.setAssetSubType(contentlet.getContentType().variable())).
Only the default "Web Page Content" content type has velocity variable htmlpageasset. Any custom content type of base type Page (e.g., "Landing Page", "Detail Page", etc.) will have a different variable name and will always fail this check — even though it is a perfectly valid page.
The error thrown:
Bad request error
[<identifier>] in Content Type [<name>] is not a valid detail page.
This is thrown from DetailPageTransformerImpl.validateIdentifier() (lines 136–138) every time a Content Type is saved with a detail page that uses a custom Page content type. Notably:
- Pages set as detail pages before this validation was introduced still work at runtime (URL mapping reads directly from the DB)
- Trying to update those same Content Types also fails with this error
- There is no workaround through the UI; only a direct DB update to the
page_detail column in the structure table can unblock customers
Steps to Reproduce
- Create a Content Type with base type Page using a custom name (e.g., "Landing Page" with velocity variable
landingPage)
- Create a page using that custom Page content type at any path (e.g.,
//mysite.com/detail-pages/my-landing-page)
- Create or edit any Content Type that supports URL mapping, set the Detail Page field to the page from step 2
- Save the Content Type
- Observe error:
Bad request error — [<identifier>] in Content Type [X] is not a valid detail page.
Acceptance Criteria
dotCMS Version
Unknown — confirmed present in current codebase. Pre-existing detail pages set before this validation was introduced still function at runtime, indicating this is a regression introduced when save-time validation was added.
Severity
High - Major functionality broken
Links
Problem Statement
DetailPageTransformerImplvalidates detail pages by checkingassetSubType.equals("htmlpageasset"). However,assetSubTypeis populated from the content type's velocity variable name (set inIdentifierFactoryImplline 360:identifier.setAssetSubType(contentlet.getContentType().variable())).Only the default "Web Page Content" content type has velocity variable
htmlpageasset. Any custom content type of base type Page (e.g., "Landing Page", "Detail Page", etc.) will have a different variable name and will always fail this check — even though it is a perfectly valid page.The error thrown:
This is thrown from
DetailPageTransformerImpl.validateIdentifier()(lines 136–138) every time a Content Type is saved with a detail page that uses a custom Page content type. Notably:page_detailcolumn in thestructuretable can unblock customersSteps to Reproduce
landingPage)//mysite.com/detail-pages/my-landing-page)Bad request error — [<identifier>] in Content Type [X] is not a valid detail page.Acceptance Criteria
Page(regardless of velocity variable name) are accepted as valid detail pages"htmlpageasset"string check inDetailPageTransformerImpl.validateIdentifier()is replaced with a proper base-type check (e.g., verify the content type'sBaseContentTypeisHTMLPAGE)dotCMS Version
Unknown — confirmed present in current codebase. Pre-existing detail pages set before this validation was introduced still function at runtime, indicating this is a regression introduced when save-time validation was added.
Severity
High - Major functionality broken
Links