Hi, I'm trying to upgrade my forum from Beta 7 to Beta 8, but after doing the upgrade, I'm getting an error when trying to view my forum's homepage:
TypeError
Argument 1 passed to Flarum\Formatter\Event\Rendering::__construct() must be an instance of s9e\TextFormatter\Renderer, instance of __PHP_Incomplete_Class given, called in /var/www/testforum/vendor/flarum/core/src/Formatter/Formatter.php on line 78
My upgrade process was as follows:
- I disabled all 3rd-party extensions. (Specifically, all the ones with versions in formats other than
v0.1.0-beta.X
.)
- I verified that I am running the required software:
php --version
prints PHP 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Dec 7 2018 08:07:08) ( NTS )
mysql --version
prints mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper
- I installed a fresh copy of flarum into an empty directory by running
composer create-project flarum/flarum . --stability=beta
- I copied my old
config.php
into the new folder.
- I copied my old
assets
folder into the new public
folder.
- I ran
sudo chown -R myser:www-data .
to make all of flarum's folder writable by apache.
- I ran
composer update
which seemed to do nothing.
- I ran
php flarum migrate
which took a few minutes and had no errors.
- I ran
php flarum cache:clear
.
- I set my webroot to point at the new
public
folder.
- I attempted to open the forum in my browser, resulting in the above error.
Please let me know what additional information I can provide to help debug this. Here's the full stack trace:
52
TypeError
…/vendor/flarum/core/src/Formatter/Event/Rendering.php38
51
Flarum\Formatter\Event\Rendering __construct
…/vendor/flarum/core/src/Formatter/Formatter.php78
50
Flarum\Formatter\Formatter render
…/vendor/flarum/core/src/Post/CommentPost.php173
49
Flarum\Post\CommentPost getContentHtmlAttribute
…/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php438
48
Illuminate\Database\Eloquent\Model mutateAttribute
…/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php340
47
Illuminate\Database\Eloquent\Model getAttributeValue
…/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php313
46
Illuminate\Database\Eloquent\Model getAttribute
…/vendor/flarum/core/src/Database/AbstractModel.php118
45
Flarum\Database\AbstractModel getAttribute
…/vendor/illuminate/database/Eloquent/Model.php1382
44
Illuminate\Database\Eloquent\Model __get
…/vendor/flarum/core/src/Api/Serializer/BasicPostSerializer.php47
43
Flarum\Api\Serializer\BasicPostSerializer getDefaultAttributes
…/vendor/flarum/core/src/Api/Serializer/AbstractSerializer.php71
42
Flarum\Api\Serializer\AbstractSerializer getAttributes
…/vendor/tobscure/json-api/src/Resource.php169
41
Tobscure\JsonApi\Resource getAttributes
…/vendor/tobscure/json-api/src/Resource.php75
40
Tobscure\JsonApi\Resource toArray
…/vendor/tobscure/json-api/src/Document.php187
39
Tobscure\JsonApi\Document Tobscure\JsonApi\{closure}
[internal]0
38
array_map
…/vendor/tobscure/json-api/src/Document.php188
37
Tobscure\JsonApi\Document toArray
…/vendor/tobscure/json-api/src/Document.php224
36
Tobscure\JsonApi\Document jsonSerialize
…/vendor/flarum/core/src/Api/JsonApiResponse.php29
35
Flarum\Api\JsonApiResponse __construct
…/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php113
34
Flarum\Api\Controller\AbstractSerializeController handle
…/vendor/flarum/core/src/Api/Client.php71
33
Flarum\Api\Client send
…/vendor/flarum/core/src/Forum/Content/Index.php91
32
Flarum\Forum\Content\Index getApiDocument
…/vendor/flarum/core/src/Forum/Content/Index.php59
31
Flarum\Forum\Content\Index __invoke
…/vendor/flarum/core/src/Frontend/Frontend.php65
30
Flarum\Frontend\Frontend populate
…/vendor/flarum/core/src/Frontend/Frontend.php57
29
Flarum\Frontend\Frontend document
…/vendor/flarum/core/src/Frontend/Controller.php34
28
Flarum\Frontend\Controller handle
…/vendor/flarum/core/src/Http/RouteHandlerFactory.php40
27
Flarum\Http\RouteHandlerFactory Flarum\Http\{closure}
…/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php67
26
Flarum\Http\Middleware\DispatchRoute process
…/vendor/zendframework/zend-stratigility/src/Next.php52
25
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php58
24
Flarum\Http\Middleware\ShareErrorsFromSession process
…/vendor/zendframework/zend-stratigility/src/Next.php52
23
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/SetLocale.php51
22
Flarum\Http\Middleware\SetLocale process
…/vendor/zendframework/zend-stratigility/src/Next.php52
21
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php34
20
Flarum\Http\Middleware\AuthenticateWithSession process
…/vendor/zendframework/zend-stratigility/src/Next.php52
19
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php52
18
Flarum\Http\Middleware\RememberFromCookie process
…/vendor/zendframework/zend-stratigility/src/Next.php52
17
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/StartSession.php62
16
Flarum\Http\Middleware\StartSession process
…/vendor/zendframework/zend-stratigility/src/Next.php52
15
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php48
14
Flarum\Http\Middleware\CollectGarbage process
…/vendor/zendframework/zend-stratigility/src/Next.php52
13
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php29
12
Flarum\Http\Middleware\ParseJsonBody process
…/vendor/zendframework/zend-stratigility/src/Next.php52
11
Zend\Stratigility\Next handle
…/vendor/flarum/core/src/Http/Middleware/HandleErrorsWithWhoops.php43
10
Flarum\Http\Middleware\HandleErrorsWithWhoops process
…/vendor/zendframework/zend-stratigility/src/Next.php52
9
Zend\Stratigility\Next handle
…/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php91
8
Zend\Stratigility\MiddlewarePipe process
…/vendor/middlewares/request-handler/src/RequestHandler.php84
7
Middlewares\RequestHandler process
…/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php78
6
Zend\Stratigility\MiddlewarePipe handle
…/vendor/middlewares/base-path-router/src/BasePathRouter.php97
5
Middlewares\BasePathRouter process
…/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php78
4
Zend\Stratigility\MiddlewarePipe handle
…/vendor/middlewares/base-path/src/BasePath.php53
3
Middlewares\BasePath process
…/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php78
2
Zend\Stratigility\MiddlewarePipe handle
…/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php95
1
Zend\HttpHandlerRunner\RequestHandlerRunner run
…/vendor/flarum/core/src/Http/Server.php46
0
Flarum\Http\Server listen
…/public/index.php22
As a simple test, I also tried installing beta 8 from scratch without migrating from my old forum, and that worked fine.