Closed wezell closed 1 month ago
As suggested in the PR
Testing
Testing
Therefore I'm passing the issue
Fixed, tested following the provided steps in the last comment and I'm unable to reproduce the problem..
Tested on the latest trunk // Docker // FF
Parent Issue
No response
Problem Statement
If there is a content type ID mismatch between two environments and you run the integrity checker, we update the
structure.inode
and thecontentlet.structure_inode
in the structure and contentlet tables but we do not update thecontentlet.contentlet_as_json['contentType']
This causes an error when dotCMS tries to load the content type from the information stored in the json - that content type id no longer exists. See here where we are trying to load the content type from the information in the json - kaboom! :
https://github.com/dotCMS/core/blob/master/dotCMS/src/main/java/com/dotcms/content/business/json/ContentletJsonAPIImpl.java#L289
We should alway be loading the content type from the column in the db - which should be seen as the source of truth. That said, there are a few options and maybe we need to do a few of them
contentType
value in the JSONSteps to Reproduce
To reproduce it quickly, just update a piece of content's json with a content type that does not exist, e.g.
Acceptance Criteria
The content type in the database field should be primary - we should be able to update that column in the content type and not blow up the content. I would like to avoid a "fix" that makes the integrity checker run an update on all the contentlet_as_json values as on large datasets that could take a very long time.
If we do choose to store the contentType.variable in the json rather than the id, then I would say that could happen lazily
dotCMS Version
23.10
Maybe 23.01 - wherever we added support for the contentlet as json
Proposed Objective
Reliability
Proposed Priority
Priority 1 - Show Stopper
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response