Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Physically removed asset breaks assets loading and any content page which includes it #11196

Closed
marcusgaius opened this issue May 11, 2022 · 2 comments

Comments

@marcusgaius
Copy link
Contributor

marcusgaius commented May 11, 2022

What happened?

Description

Getting error message "craft\services\Assets::getThumbUrl(): Return value must be of type string, null returned" when trying to open a cp page which should have access to an asset with broken index if the rendered preview is not present

Steps to reproduce

  1. move or delete an asset from the indexed path
  2. remove preview folders (not sure how those should be referred to, attaching a screenshot of them below)
  3. try to access asset index, or element (including global) containing a field with the asset
    image

Expected behavior

In Craft3, the thumbnail would be missing, and asset (image) wouldn't be there on the front, but the dashboard would work even without asset reindexing, showing empty thumbnails.

Actual behavior

The assets index page breaks, can't upload any additional assets without reindexing, the content pages relating to the missing asset break with critical error screen

Craft CMS version

4.0.0

PHP version

8.0.13|8.0.18

Operating system and version

Ubuntu 20.04|Ubuntu 20.04 (WSL2)

Database type and version

Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))|Ver 8.0.29-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))

Image driver and version

GD 2.3.0|GD 2.3.0

Installed plugins and versions

  • verbb/navigation 2.0.0
  • spicywebau/craft-neo 3.x-dev
  • craftcms/redactor 3.0.x-dev
  • nystudio107/craft-seomatic 4.0.0-beta.8
brandonkelly added a commit that referenced this issue May 11, 2022
@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed now for the next release.

brandonkelly added a commit that referenced this issue May 11, 2022
@brandonkelly
Copy link
Member

Craft 4.0.2 is out now with the fix for this.

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

No branches or pull requests

2 participants