Error when give or remove reaction (but it works)
skariko opened this issue · comments
Bug Report
Current Behavior
When I press on any reaction, this error comes up: Oops! Something went wrong. Please reload the page and try again.
But actually the reaction is given.
The same happens the moment I try to remove (or change) the reaction. It gives that error but the reaction is taken out.
Steps to Reproduce
- Go to https://forum.lealternative.net/d/3-test-windows
- Try to give a reaction (anonymous is enabled) to the post
- See error
Expected Behavior
No error 🥴
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- Flarum version: 1.8.5
- Extension version: 1.4.1
- Website URL: https://forum.lealternative.net/d/3-test-windows
- Webserver: apache
- Hosting environment: shared
- PHP version: 8.2.16
- Browser: every browser i have tried (desktop and mobile)
Output of "php flarum info", run this in terminal in your Flarum directory.
Checking platform requirements for packages in the vendor dir ext-ctype * success provided by symfony/polyfill-ctype ext-curl 8.1.27 success ext-dom 20031129 success ext-fileinfo 8.1.27 success ext-filter 8.1.27 success ext-json 8.1.27 success ext-libxml 8.1.27 success ext-mbstring * success provided by symfony/polyfill-mbstring ext-openssl 8.1.27 success ext-pcre 8.1.27 success ext-pdo 8.1.27 success lib-pcre 10.39 success php 8.1.27 success uid156326@h2web220:~/xxx/forum.lealternative.net$ php flarum info Flarum core: 1.8.5 PHP version: 8.1.27 MySQL version: 5.7.32-log Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, json, iconv, SPL, intl, session, ldap, mbstring, standard, pcntl, PDO, mysqlnd, pdo_sqlite, pgsql, Phar, posix, readline, Reflection, imap, SimpleXML, soap, sockets, sodium, pdo_mysql, exif, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, mysqli, imagick, mailparse, mcrypt, memcached, mongodb, OAuth, raphf, ssh2, timezonedb, uploadprogress, yaz, zip, http +---------------------------------+---------+--------+ | Flarum Extensions | | | +---------------------------------+---------+--------+ | ID | Version | Commit | +---------------------------------+---------+--------+ | flarum-flags | v1.8.0 | | | flarum-tags | v1.8.0 | | | flarum-approval | v1.8.1 | | | justoverclock-lang-ita-extended | 2.0.3 | | | ianm-syndication | 1.3.4 | | | fof-reactions | 1.4.1 | | | flarum-suspend | v1.8.1 | | | flarum-subscriptions | v1.8.0 | | | flarum-sticky | v1.8.0 | | | flarum-statistics | v1.8.0 | | | flarum-mentions | v1.8.3 | | | flarum-markdown | v1.8.0 | | | flarum-lock | v1.8.0 | | | flarum-lang-english | v1.8.0 | | | flarum-extension-manager | v1.0.3 | | | flarum-emoji | v1.8.0 | | | flarum-bbcode | v1.8.0 | | +---------------------------------+---------+--------+ Base URL: https://forum.lealternative.net Installation path: /xxx/ Queue driver: sync Session driver: file Mail driver: smtp Debug mode: off
Possible solution(s)
Additional Context
Add any other context about the problem here.
EDIT:
this is DEBUG CODE:
`POST https://forum.lealternative.net/api/posts/3
Deprecated: Creation of dynamic property FoF\Reactions\Event\PostWasReacted::$actor is deprecated in /XXXXXXXXX/forum.lealternative.net/vendor/flarum/core/src/Foundation/DispatchEventsTrait.php on line 31
Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /XXXXXXXXXXXXXXXXXXXX/forum.lealternative.net/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:20 Stack trace: #0 /XXXXXXXXXXXXXXXXXXX/forum.lealternative.net/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(42): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent() #1 /XXXXXXXXXXXXXXXXXXXXXXX/forum.lealternative.net/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(21): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2 /XXXXXXXXXXXXXXXXXXXXXXXXXX/forum.lealternative.net/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(75): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(Flarum\Api\JsonApiResponse)) #3 /XXXXXXXXXXXXXXXXXXXXXXXX/forum.lealternative.net/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run() #4 /XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/forum.lealternative.net/index.php(26): Flarum\Http\Server->listen() #5 {main} thrown in /XXXXXXXXXXXXXXXXXXXXXXX/forum.lealternative.net/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php on line 20`
`
Update: if I switch PHP from 8.2 to 8.1 it seems to works with no error.
Duplicate of #84 I believe.
Regardless, deprecation warnings should be disabled on production environments.