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

Can't access blog with SEO extension installed but disabled: Container was not yet initialized #150

Open
clarkwinkelmann opened this issue Aug 30, 2022 · 0 comments

Comments

@clarkwinkelmann
Copy link

clarkwinkelmann commented Aug 30, 2022

If the SEO extension is installed on the forum but not enabled, trying to access any blog page results in a 500 error.

This error was already reported last year on the SEO bugtracker but without mentioning the Blog-SEO relationship was the cause. I added some information to the other ticket as well v17development/flarum-seo#67

The problem is that this extension only checks whether the SEO classes exist and not whether SEO is enabled, and SEO doesn't support having its extenders called without the extension being enabled.

[2022-08-30 12:47:20] flarum.ERROR: Exception: V17Development\FlarumSeo\Extend::setTitle(..): Container was not yet initialized. in /home/clark/Projects/flarum-1.4/vendor/v17development/flarum-seo/src/Extend.php:196
Stack trace:
#0 /home/clark/Projects/flarum-1.4/vendor/v17development/flarum-seo/src/Extend.php(36): V17Development\FlarumSeo\Extend::throwError()
#1 /home/clark/Projects/flarum-1.4/vendor/v17development/flarum-blog/src/Controller/BlogOverviewController.php(40): V17Development\FlarumSeo\Extend::setTitle()
#2 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Frontend/Frontend.php(62): V17Development\FlarumBlog\Controller\BlogOverviewController->__invoke()
#3 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Frontend/Frontend.php(54): Flarum\Frontend\Frontend->populate()
#4 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Frontend/Controller.php(32): Flarum\Frontend\Frontend->document()
#5 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Frontend\Controller->handle()
#6 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#7 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ExecuteRoute->process()
#8 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ContentTypeOptionsHeader.php(21): Laminas\Stratigility\Next->handle()
#9 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ContentTypeOptionsHeader->process()
#10 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ReferrerPolicyHeader.php(30): Laminas\Stratigility\Next->handle()
#11 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ReferrerPolicyHeader->process()
#12 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/FlarumPromotionHeader.php(30): Laminas\Stratigility\Next->handle()
#13 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\FlarumPromotionHeader->process()
#14 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php(57): Laminas\Stratigility\Next->handle()
#15 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ShareErrorsFromSession->process()
#16 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(36): Laminas\Stratigility\Next->handle()
#17 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\CheckCsrfToken->process()
#18 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle()
#19 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ResolveRoute->process()
#20 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#21 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\SetLocale->process()
#22 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#23 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\AuthenticateWithSession->process()
#24 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#25 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\RememberFromCookie->process()
#26 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#27 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\StartSession->process()
#28 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php(46): Laminas\Stratigility\Next->handle()
#29 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\CollectGarbage->process()
#30 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#31 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ParseJsonBody->process()
#32 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#33 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\HandleErrors->process()
#34 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#35 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\InjectActorReference->process()
#36 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#37 /home/clark/Projects/flarum-1.4/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#38 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\RequestHandler->process()
#39 /home/clark/Projects/flarum-1.4/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#40 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePathRouter->process()
#41 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#42 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Laminas\Stratigility\Middleware\OriginalMessages->process()
#43 /home/clark/Projects/flarum-1.4/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#44 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePath->process()
#45 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#46 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ProcessIp->process()
#47 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle()
#48 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(65): Laminas\Stratigility\MiddlewarePipe->process()
#49 /home/clark/Projects/flarum-1.4/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#50 /home/clark/Projects/flarum-1.4/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#51 /home/clark/Projects/flarum-1.4/public/index.php(26): Flarum\Http\Server->listen()
#52 {main}  
Flarum core 1.4.0
PHP version: 8.0.22
MySQL version: 8.0.30-0ubuntu0.20.04.2
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+---------------------------+------------+------------------------------------------+
| Flarum Extensions         |            |                                          |
+---------------------------+------------+------------------------------------------+
| ID                        | Version    | Commit                                   |
+---------------------------+------------+------------------------------------------+
| flarum-tags               | v1.4.0     |                                          |
| flarum-lock               | v1.4.0     |                                          |
| flarum-flags              | v1.4.0     |                                          |
| v17development-blog       | v0.6.4     |                                          |
| migratetoflarum-fake-data | dev-master |                                          |
| flarum-suspend            | v1.4.0     |                                          |
| flarum-subscriptions      | v1.4.0     |                                          |
| flarum-sticky             | v1.4.0     |                                          |
| flarum-mentions           | v1.4.0     |                                          |
| flarum-markdown           | v1.4.0     |                                          |
| flarum-lang-french        | v3.9.0     |                                          |
| flarum-lang-english       | v1.4.0     |                                          |
| flarum-bbcode             | v1.4.0     |                                          |
| flarum-approval           | v1.4.0     |                                          |
| clarkwinkelmann-vod       | dev-master |                                          |
| clarkwinkelmann-scout     | dev-main   | b66fad2941d1078297dee630da4bb36ce54e7362 |
+---------------------------+------------+------------------------------------------+
Base URL: http://1.4.flarum.localhost
Installation path: /home/clark/Projects/flarum-1.4
Queue driver: sync
Mail driver: smtp
Debug mode: ON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant