Skip to content

[Bug]: Studio document preview fails when the page count is not known yet #623

Closed

Description

@kingjia90

Problem

In Pimcore Studio, the preview of a non-PDF document asset fails ("not found") whenever the asset has no page count yet.

DocumentService::validateAssetDocument() in studio-backend-bundle (2026.3, src/Asset/Service/DocumentService.php:133) throws ElementStreamResourceNotFoundException when $asset->getPageCount() is empty. getPageCount() reads the pageCount custom setting, which the asset update-tasks queue writes. It is null until that queue has processed the asset, and stays null permanently if page-count extraction failed or the setting was never written. The document itself would convert fine.

Expected

Let the PDF conversion decide. The conversion path already handles an unconvertible document, so the preview should only fail when the conversion actually fails.

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

Affected capability

None yet

Platform Version

None yet

Galaxy

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions