getFileStorageLocationObject() on null
Permalink
I was just moving Images into folders in v8.1 and afterwards some of my pages got corrupted.
Error
Call to a member function getFileStorageLocationObject() on null
On updates/concrete5.8.1.0/concrete/src/File/Image/BasicThumbnailer.php
public function getThumbnail($obj, $maxWidth, $maxHeight, $crop = false)
{
$storage = $obj->getFileStorageLocationObject();
I'm not able to edit the page.
Error
Call to a member function getFileStorageLocationObject() on null
On updates/concrete5.8.1.0/concrete/src/File/Image/BasicThumbnailer.php
public function getThumbnail($obj, $maxWidth, $maxHeight, $crop = false)
{
$storage = $obj->getFileStorageLocationObject();
I'm not able to edit the page.
And since it's a file in the concrete/src folder, it is difficult be directly overridden. So your second choice is to update the code in that file directly to return a dummy $thumbnail image when $obj is null. This is option is not recommended because it might fix it or it might open a can of worm on other errors.