Update text extraction in DocumentSerializationHandler - #482
Open
dpfaffenbauer wants to merge 1 commit into
Open
Update text extraction in DocumentSerializationHandler#482dpfaffenbauer wants to merge 1 commit into
dpfaffenbauer wants to merge 1 commit into
Conversation
Refactor text extraction to use a dedicated method for better error handling.
pimcore-deployments
marked this pull request as draft
July 23, 2026 12:53
|
dpfaffenbauer
marked this pull request as ready for review
July 23, 2026 12:54
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors text extraction in DocumentSerializationHandler so that a failure during Document::getText() no longer aborts serialization/indexing of the whole document asset. The inline $asset->getText() call is replaced by a dedicated getAssetText() helper that catches errors, logs them, and returns null. This mirrors the existing getImageThumbnail() helper in the same class, making the two additional-system-field extractions behave consistently (best-effort with graceful degradation).
Changes:
- Extract text retrieval into a private
getAssetText(Document $document)method with try/catch and error logging. - Route
DocumentSystemField::TEXTpopulation through the new helper so extraction failures are logged instead of propagated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Refactor text extraction to use a dedicated method for better error handling.
Changes in this pull request
Resolves pimcore/platform-version#244
Additional info