flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.39k stars 835 forks source link

buggy mount-redraw.js preventing successful upgrade to beta 14 #2447

Closed HLFH closed 4 years ago

HLFH commented 4 years ago

Bug Report

Current Behavior The forum homepage is not loading correctly after the upgrade to beta 14.

Steps to Reproduce

  1. Update your composer.json
  2. Follow upgrade procedure to beta 14
  3. Load the forum and connect if not connected yet to see private posts within the homepage
  4. See error with posts not entirely loading with warning message

Expected Behavior The forum homepage should load correctly after the upgrade to beta 14.

Environment

➜  forum sudo -u http php flarum info
Flarum core 0.1.0-beta.14.1
PHP version: 7.4.12
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, ctype, dom, fileinfo, filter, hash, json, mbstring, pcntl, SPL, PDO, bz2, posix, readline, Reflection, session, SimpleXML, standard, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, bcmath, Phar, curl, exif, ftp, gd, gettext, gmp, iconv, imap, intl, mysqli, pdo_mysql, pdo_sqlite, pspell, sockets, sqlite3, tidy, xmlrpc, zip, geoip, igbinary, imagick, mailparse, redis, Zend OPcache
+------------------------------+------------------+--------+
| Flarum Extensions            |                  |        |
+------------------------------+------------------+--------+
| ID                           | Version          | Commit |
+------------------------------+------------------+--------+
| flarum-approval              | v0.1.0-beta.14   |        |
| flarum-bbcode                | v0.1.0-beta.12   |        |
| flarum-flags                 | v0.1.0-beta.14.1 |        |
| flarum-likes                 | v0.1.0-beta.14   |        |
| flarum-lock                  | v0.1.0-beta.14   |        |
| flarum-mentions              | v0.1.0-beta.14   |        |
| flarum-sticky                | v0.1.0-beta.14   |        |
| flarum-suspend               | v0.1.0-beta.14   |        |
| flarum-tags                  | v0.1.0-beta.14   |        |
| flarum-subscriptions         | v0.1.0-beta.14   |        |
| cbmainz-de                   | 0.12.1           |        |
| flarum-markdown              | v0.1.0-beta.14   |        |
| flarum-statistics            | v0.1.0-beta.14   |        |
| flarum-emoji                 | v0.1.0-beta.14   |        |
| flarum-lang-english          | v0.1.0-beta.14.1 |        |
| fof-links                    | 0.4.0            |        |
| fof-transliterator           | 0.2.0            |        |
| fof-user-directory           | 0.3.4            |        |
| fof-byobu                    | 0.5.6            |        |
| fof-split                    | 0.5.0            |        |
| fof-upload                   | 0.11             |        |
| qiaeru-lang-french           | v1.8.1           |        |
| rooaaar-lang-french-extended | v1.16.0          |        |
| fof-user-bio                 | 0.3.1            |        |
+------------------------------+------------------+--------+
Base URL: https://forum.acsemb.org
Installation path: /srv/http/acsemb/forum
Debug mode: ON

Possible Solution I don't know which extension is problematic/related to the bug yet. I don't know if it is even a core issue.

Additional Context This is what is saying Chrome web console:

Uncaught Error: [e] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute
at e.u.setAttrs (Component.ts:114)
at e.u.oninit (Component.ts:57)
at Function.a (render.js:30)
at M (render.js:917)
at render.js:153
at render.js:160
at l (render.js:66)
at u (render.js:50)
at render.js:134
at l (render.js:63)

mount-redraw.js:15 TypeError: Cannot read property 'onbeforeupdate' of undefined
at render.js:929
at f (render.js:407)
at h (render.js:302)
at render.js:477
at f (render.js:416)
at h (render.js:315)
at render.js:477
at f (render.js:416)
at h (render.js:302)
at render.js:477
a @ mount-redraw.js:15
askvortsov1 commented 4 years ago

This is an issue with an extension that is using the unsupported "children" attr, not with core. You might want to go through your list of extensions and ensure that all have been updated for beta 14.

HLFH commented 4 years ago

All have been updated for beta 14, but I still have the bug and I am not the only one. I suggest you reopen the issue. Example of people having similar issue.

➜  forum extiverse check                    
+------------------------------+------------------+-----------------+------+------------------------------------+
| Extension                    | Installed        | Highest         | FLC* | Discuss                            |
+------------------------------+------------------+-----------------+------+------------------------------------+
| flarum                       | v0.1.0-beta.14.1 | 0.1.0-beta.14.1 | ✅    |                                    |
| cbmainz/flarum-de            | 0.13.0           | 0.13.0          | ✅    |                                    |
| flarum/akismet               | v0.1.0-beta.14.1 | 0.1.0-beta.14.1 | ✅    |                                    |
| flarum/approval              | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/bbcode                | v0.1.0-beta.12   | 0.1.0-beta.12   | 🛑    |                                    |
| flarum/emoji                 | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/flags                 | v0.1.0-beta.14.1 | 0.1.0-beta.14.1 | ✅    |                                    |
| flarum/lang-english          | v0.1.0-beta.14.1 | 0.1.0-beta.14.1 | ✅    |                                    |
| flarum/likes                 | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/lock                  | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/markdown              | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/mentions              | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/pusher                | v0.1.0-beta.14.1 | 0.1.0-beta.14.1 | ✅    |                                    |
| flarum/statistics            | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/sticky                | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/subscriptions         | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/suspend               | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| flarum/tags                  | v0.1.0-beta.14   | 0.1.0-beta.14   | ✅    |                                    |
| fof/byobu                    | 0.5.6            | 0.5.6           | 🛑    |                                    |
| fof/links                    | 0.4.1            | 0.4.1           | ✅    | https://discuss.flarum.org/d/18335 |
| fof/split                    | 0.5.0            | 0.5.0           | ✅    |                                    |
| fof/transliterator           | 0.2.1            | 0.2.1           | ✅    | https://discuss.flarum.org/d/18074 |
| fof/upload                   | 0.11             | 0.11            | ✅    | https://discuss.flarum.org/d/4154  |
| fof/user-bio                 | 0.3.1            | 0.3.1           | ✅    | https://discuss.flarum.org/d/17775 |
| fof/user-directory           | 0.4.0            | 0.4.0           | ✅    | https://discuss.flarum.org/d/5682  |
| qiaeru/lang-french           | v1.8.1           | 1.8.1           | ✅    |                                    |
| rooaaar/lang-french-extended | dev-master       | 1.16.0          | 🛑    | https://discuss.flarum.org/d/20039 |
+------------------------------+------------------+-----------------+------+------------------------------------+
* FLC: Compatiblity of extension with latest Flarum version: 0.1.0-beta.14.1

flarum/bbcode is compatible rooaaar/lang-french-extended in dev-master is compatible

askvortsov1 commented 4 years ago

Are you able to replicate this issue on https://beta.flarum.site/? Or with all community extensions disabled? (Note that byobu is not beta 14 compatible). The reason why I am hesitant to reopen the issue is that we've been unable to replicate it with only core and bundled extensions in our dev and QA testing.

HLFH commented 4 years ago

I am not able to replicate the issue on https://beta.flarum.site/. fof/byobu seems be the culprit, so I disabled it, and the forum homepage loads correctly.

And eventually the fact not every string seems to be translated from English to German and French locales. I'll look into that. Thanks for the reply.

dsevillamartin commented 4 years ago

The stack trace says mount-redraw because that's Mithril code, and the error occurs after internal Mithril redraws. 99% of the time the problem will not be with that file or any Mithril file.

The error that is thrown was added by us so that it makes more sense than the one Mithril will throw if a children attr is passed. It is usually caused by code that hasn't been updated for beta 14.

tankerkiller125 commented 4 years ago

fof/byobu appears to be your issue, from what I know it's not updated (and it shows not updated in that list)

HLFH commented 4 years ago

@tankerkiller125 Everything now works with fof-byobu disabled and lang-french updated.