Hey I'm having an issue with the "My Media" profile page after doing an import to Flarum and I'm wondering if anyone has any ideas what's wrong.
This is the page /u/{username}/uploads
and the error on page is the "Oops!" error.
The actual error and first bit of the stack trace:
Error: Call to a member function preview() on array in /Users/linc/code/flarum/packages/upload/src/Helpers/Util.php:153
Stack trace:
#0 /Users/linc/code/flarum/packages/upload/src/Api/Serializers/FileSerializer.php(46): FoF\Upload\Helpers\Util->getBbcodeForFile(Object(FoF\Upload\File))
#1 /Users/linc/code/flarum/packages/core/src/Api/Serializer/AbstractSerializer.php(88): FoF\Upload\Api\Serializers\FileSerializer->getDefaultAttributes(Object(FoF\Upload\File))
#2 /Users/linc/code/flarum/vendor/tobscure/json-api/src/Resource.php(169): Flarum\Api\Serializer\AbstractSerializer->getAttributes(Object(FoF\Upload\File), NULL)
#3 /Users/linc/code/flarum/vendor/tobscure/json-api/src/Resource.php(75): Tobscure\JsonApi\Resource->getAttributes()
#4 /Users/linc/code/flarum/vendor/tobscure/json-api/src/Collection.php(123): Tobscure\JsonApi\Resource->toArray()
#5 [internal function]: Tobscure\JsonApi\Collection->Tobscure\JsonApi\{closure}(Object(Tobscure\JsonApi\Resource))
#6 /Users/linc/code/flarum/vendor/tobscure/json-api/src/Collection.php(124): array_map(Object(Closure), Array)
#7 /Users/linc/code/flarum/vendor/tobscure/json-api/src/Document.php(181): Tobscure\JsonApi\Collection->toArray()
I'm not currently populating the upload_method
, uuid
, or tag
columns, but this error is a wrong datatype which makes me wonder if it's something deeper.