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

Clearing cache might break forum with exception related to text formatter #2723

Closed
matteocontrini opened this issue Mar 21, 2021 · 1 comment · Fixed by #2756
Closed

Clearing cache might break forum with exception related to text formatter #2723

matteocontrini opened this issue Mar 21, 2021 · 1 comment · Fixed by #2756
Assignees
Milestone

Comments

@matteocontrini
Copy link
Contributor

Bug Report

Current Behavior

As discussed here in some setups (?) clearing cache with php flarum cache:clear breaks the forum.

The boot exception is:

Argument 1 passed to Flarum\Mentions\Formatter\FormatPostMentions::__invoke() must be an instance of s9e\TextFormatter\Renderer, instance of __PHP_Incomplete_Class given, called in /usr/local/openresty/nginx/html/flarum16/vendor/flarum/core/src/Foundation/ContainerUtil.php on line 30

Removing everything in storage/cache fixes the issue, until next time.

Environment

  • Flarum version: beta16
  • Webserver: nginx
  • Hosting environment: local installation
  • PHP version: 7.3
Flarum core 0.1.0-beta.16
PHP version: 7.3.23-3+ubuntu20.04.1+deb.sury.org+1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, sodium, standard, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, Zend OPcache
+----------------------+----------------+--------+
| Flarum Extensions    |                |        |
+----------------------+----------------+--------+
| ID                   | Version        | Commit |
+----------------------+----------------+--------+
| flarum-flags         | v0.1.0-beta.16 |        |
| flarum-markdown      | v0.1.0-beta.16 |        |
| flarum-approval      | v0.1.0-beta.16 |        |
| flarum-bbcode        | v0.1.0-beta.16 |        |
| flarum-emoji         | v0.1.0-beta.16 |        |
| flarum-lang-english  | v0.1.0-beta.16 |        |
| flarum-lock          | v0.1.0-beta.16 |        |
| flarum-mentions      | v0.1.0-beta.16 |        |
| flarum-statistics    | v0.1.0-beta.16 |        |
| flarum-sticky        | v0.1.0-beta.16 |        |
| flarum-subscriptions | v0.1.0-beta.16 |        |
| flarum-suspend       | v0.1.0-beta.16 |        |
| flarum-tags          | v0.1.0-beta.16 |        |
| flarum-likes         | v0.1.0-beta.16 |        |
+----------------------+----------------+--------+
Base URL: http://flarum16.localhost
Installation path: /usr/local/openresty/nginx/html/flarum16
Debug mode: ON
@askvortsov1 askvortsov1 added this to the 0.1 milestone Mar 21, 2021
@JoshyPHP
Copy link
Contributor

__PHP_Incomplete_Class would indicate an autoloading issue, I assume with the class generated for the renderer. So either the SPL autoloader wasn't set or the file was missing when the object was unserialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants