[DEFECT] Publishing fails when required Expire Date field is left empty while “Never Expire” is enabled
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
While reviewing a customer instance, we identified an issue related to content publishing when an Expire Date field (Publish Till) is configured as required and the content is marked as Never Expire.
In this scenario, the Expire Date field remains empty, which results in an inconsistent content state that later causes a failure when the content enters the publishing queue.
Observed Error
When the publishing job is executed, the following error is raised:
Failed to fire Workflow Action 'Publish' [REDACTED]:
Contentlet with ID '[REDACTED]' has invalid/missing field(s).
Fields: [REQUIRED]: Publish Till (UTC) (publishTill)
Identifiers have been intentionally redacted to avoid exposing sensitive information.
Technical Details
• The exception is caught in the fireWorkflowPostCheckin method, which indicates that the publish action is being executed via a custom workflow configuration.
• Despite the error being raised during the publish process, the contentlet is still reindexed.
• As a result, the content ends up in an inconsistent or “dirty” indexed state, where it cannot be successfully processed by the publishing workflow.
• This behavior may contribute to repeated publish/unpublish attempts or infinite processing loops.
As can be seen here, we are always sending stuff into the reindexQueue. Perhaps this is good, but we need to prevent the exception from happening
Steps to Reproduce
1. Configure a content type with Publish Till (Expire Date) marked as required.
2. Create or edit a content item, and set a publish date in the near future.
3. Enable Never Expire.
4. Leave the Publish Till field empty.
5. Trigger the Publish workflow action.
6. Observe the error when the content reaches the publishing queue.
Acceptance Criteria
Possible Solutions / Recommendations
• Validate this scenario earlier during the internal check-in process, before the workflow is fired.
• Automatically assign a far-future expiration date when Never Expire is enabled and the field is required.
• Prevent reindexing of contentlets when workflow or validation errors occur.
• Improve error handling to ensure invalid content does not enter the publishing queue.
dotCMS Version
24.12.27_lts_v5
Severity
Medium - Some functionality impacted
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the fireWorkflowPostCheckin method and the reindexQueue behavior described in the issue, then reproduce the failure using the listed required Publish Till and Never Expire configuration. Done means the invalid content does not enter an inconsistent publishing or indexed state, with the chosen validation or error-handling behavior covered by the relevant project tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100