v17development / flarum-blog

The Flarum Blog extension
https://discuss.flarum.org/d/25392-blog-adds-a-blog-section-to-your-community
MIT License
46 stars 20 forks source link

`firstPostId()` is not always present on the discussion model #107

Open davwheat opened 3 years ago

davwheat commented 3 years ago

In some instances, the firstPostId() method is not present on the Discussion model, meaning that loading the page results in an error as the extension cannot load the article. This error breaks the forum's frontend.

image

littlegolden commented 3 years ago

I have two forms got this too, really confused.

form A info

Flarum core 1.1.1
PHP version: 8.0.11
MySQL version: 8.0.24
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom, filter, ftp, gd, gettext, hash, iconv, intl, json, mbstring, SPL, session, pcntl, standard, PDO, mysqlnd, pdo_sqlite, Phar, posix, Reflection, pdo_mysql, shmop, SimpleXML, soap, sockets, sodium, mysqli, sysvsem, tokenizer, xml, xmlreader, xmlwriter, zip, fileinfo, exif
+--------------------------------------+-------------+--------+
| Flarum Extensions                    |             |        |
+--------------------------------------+-------------+--------+
| ID                                   | Version     | Commit |
+--------------------------------------+-------------+--------+
| flarum-flags                         | v1.1.0      |        |
| flarum-suspend                       | v1.1.0      |        |
| flarum-bbcode                        | v1.1.0      |        |
| flarum-tags                          | v1.1.0      |        |
| flarum-lock                          | v1.1.0      |        |
| fof-spamblock                        | 1.0.1       |        |
| flarum-subscriptions                 | v1.1.0      |        |
| flarum-likes                         | v1.1.0      |        |
| afrux-forum-widgets-core             | v0.1.6      |        |
| wolfgang-demeter-bbcode-5star-rating | v0.1.1      |        |
| v17development-seo                   | v1.8.0      |        |
| v17development-blog                  | 0.4.2       |        |
| ralkage-hcaptcha                     | 1.0.0       |        |
| pipecraft-id-slug                    | v1.1.0      |        |
| nearata-internal-links-noreload      | v2.0.1      |        |
| nearata-embed-video                  | v3.0.0      |        |
| mickmelon-coloured-usernames         | 0.1.1       |        |
| michaelbelgium-discussion-views      | v7.1.0      |        |
| justoverclock-skypemoji              | dev-main    |        |
| justoverclock-purify                 | 0.1.7       |        |
| itnt-uitab                           | v0.4.0      |        |
| ianm-level-ranks                     | 1.0.0       |        |
| ianm-html-head                       | 1.0.0       |        |
| glowingblue-password-strength        | 3.0.0       |        |
| fof-user-directory                   | 1.0.2       |        |
| fof-user-bio                         | 1.0.0       |        |
| fof-upload                           | 1.0.5       |        |
| fof-subscribed                       | 1.0.0       |        |
| fof-stopforumspam                    | 1.1.1       |        |
| fof-split                            | 1.0.0       |        |
| fof-socialprofile                    | 1.1.0       |        |
| fof-sitemap                          | 1.0.2       |        |
| fof-reactions                        | 1.0.2       |        |
| fof-profile-image-crop               | 1.0.0       |        |
| fof-prevent-necrobumping             | 1.0.1       |        |
| fof-pretty-mail                      | 1.0.1       |        |
| fof-polls                            | 1.0.3       |        |
| fof-nightmode                        | 1.0.0       |        |
| fof-merge-discussions                | 1.0.0       |        |
| fof-links                            | 1.0.3       |        |
| fof-linguist                         | 1.0.3       |        |
| fof-ignore-users                     | 1.0.0       |        |
| fof-html-errors                      | 1.0.0       |        |
| fof-geoip                            | 1.0.1       |        |
| fof-formatting                       | 1.0.1       |        |
| fof-follow-tags                      | 1.0.2       |        |
| fof-drafts                           | 1.0.3       |        |
| fof-disposable-emails                | 1.0.0       |        |
| fof-default-user-preferences         | 1.0.0       |        |
| fof-bbcode-tabs                      | 1.0.0       |        |
| fof-bbcode-details                   | 1.0.0       |        |
| fof-analytics                        | 1.0.0       |        |
| flarum-sticky                        | v1.1.0      |        |
| flarum-statistics                    | v1.1.0      |        |
| flarum-pusher                        | v1.1.0      |        |
| flarum-nicknames                     | v1.1.0      |        |
| flarum-mentions                      | v1.1.1      |        |
| flarum-markdown                      | v1.1.0      |        |
| flarum-lang-english                  | v1.1.0      |        |
| flarum-lang-chinese-simplified       | v1.0.4.1009 |        |
| flarum-emoji                         | v1.1.0      |        |
| flarum-approval                      | v1.1.0      |        |
| ffans-clipboardjs                    | v1.0.0      |        |
| dem13n-topic-starter-label           | 0.1.7       |        |
| davwheat-share                       | v1.0.1      |        |
| darkle-fancybox                      | 0.2         |        |
| clarkwinkelmann-username-blacklist   | 1.0.0       |        |
| clarkwinkelmann-circle-groups        | 1.0.0       |        |
| clarkwinkelmann-author-change        | 1.0.2       |        |
| blomstra-horizon                     | 0.2-beta.2  |        |
| askvortsov-pwa                       | v3.0.4      |        |
| askvortsov-markdown-tables           | v1.2.1      |        |
| antoinefr-money                      | v1.1.0      |        |
| afrux-top-posters-widget             | v0.1.3      |        |
| afrux-forum-stats-widget             | dev-main    |        |
+--------------------------------------+-------------+--------+
Base URL: ttt.***.com
Installation path: /www/wwwroot/ttt.***.com
Queue driver: redis
Mail driver: smtp
Debug mode: off
form B info

Flarum core 1.1.1
PHP version: 8.0.11
MySQL version: 8.0.24
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom, filter, ftp, gd, gettext, hash, iconv, intl, json, mbstring, SPL, session, pcntl, standard, PDO, mysqlnd, pdo_sqlite, Phar, posix, Reflection, pdo_mysql, shmop, SimpleXML, soap, sockets, sodium, mysqli, sysvsem, tokenizer, xml, xmlreader, xmlwriter, zip, fileinfo, exif
+-----------------------------------+-------------+--------+
| Flarum Extensions                 |             |        |
+-----------------------------------+-------------+--------+
| ID                                | Version     | Commit |
+-----------------------------------+-------------+--------+
| flarum-flags                      | v1.1.0      |        |
| flarum-suspend                    | v1.1.0      |        |
| askvortsov-auto-moderator         | v0.1.2      |        |
| afrux-forum-widgets-core          | v0.1.6      |        |
| fof-spamblock                     | 1.0.1       |        |
| flarum-tags                       | v1.1.0      |        |
| flarum-approval                   | v1.1.0      |        |
| yannisme-cntheme                  | 1.0.4       |        |
| v17development-user-badges        | v0.2.1      |        |
| v17development-seo                | v1.8.0      |        |
| the-turk-diff                     | 1.1.1       |        |
| sycho-github-milestone            | v0.1.2      |        |
| pipecraft-id-slug                 | v1.1.0      |        |
| nearata-internal-links-noreload   | v2.0.1      |        |
| michaelbelgium-discussion-views   | v7.1.0      |        |
| justoverclock-hot-discussions     | 0.1.2       |        |
| justoverclock-custom-html-widget  | 0.1.4       |        |
| itnt-uitab                        | v0.4.0      |        |
| fof-user-directory                | 1.0.2       |        |
| fof-user-bio                      | 1.0.0       |        |
| fof-upload                        | 1.0.5       |        |
| fof-terms                         | 1.1.1       |        |
| fof-subscribed                    | 1.0.0       |        |
| fof-stopforumspam                 | 1.1.1       |        |
| fof-split                         | 1.0.0       |        |
| fof-socialprofile                 | 1.1.0       |        |
| fof-sitemap                       | 1.0.2       |        |
| fof-profile-image-crop            | 1.0.0       |        |
| fof-prevent-necrobumping          | 1.0.1       |        |
| fof-pretty-mail                   | 1.0.1       |        |
| fof-polls                         | 1.0.3       |        |
| fof-nightmode                     | 1.0.0       |        |
| fof-merge-discussions             | 1.0.0       |        |
| fof-links                         | 1.0.3       |        |
| fof-linguist                      | 1.0.3       |        |
| fof-github-autolink               | 1.0.0       |        |
| fof-geoip                         | 1.0.1       |        |
| fof-frontpage                     | 1.0.1       |        |
| fof-formatting                    | 1.0.1       |        |
| fof-drafts                        | 1.0.3       |        |
| fof-disposable-emails             | 1.0.0       |        |
| fof-default-user-preferences      | 1.0.0       |        |
| fof-cookie-consent                | 1.0.1       |        |
| fof-byobu                         | 1.0.1       |        |
| fof-best-answer                   | 1.1.5       |        |
| fof-ban-ips                       | 1.0.0       |        |
| fof-analytics                     | 1.0.0       |        |
| flarumite-simple-spoilers         | 1.0.0       |        |
| flarum-subscriptions              | v1.1.0      |        |
| flarum-sticky                     | v1.1.0      |        |
| flarum-statistics                 | v1.1.0      |        |
| flarum-pusher                     | v1.1.0      |        |
| flarum-nicknames                  | v1.1.0      |        |
| flarum-mentions                   | v1.1.1      |        |
| flarum-markdown                   | v1.1.0      |        |
| flarum-lock                       | v1.1.0      |        |
| flarum-likes                      | v1.1.0      |        |
| flarum-lang-english               | v1.1.0      |        |
| flarum-lang-chinese-simplified    | v1.0.4.1009 |        |
| flarum-emoji                      | v1.1.0      |        |
| flarum-bbcode                     | v1.1.0      |        |
| ffans-clipboardjs                 | v1.0.0      |        |
| darkle-fancybox                   | 0.2         |        |
| clarkwinkelmann-group-list        | 1.0.0       |        |
| clarkwinkelmann-emojionearea      | 1.0.0       |        |
| clarkwinkelmann-create-user-modal | 1.3.0       |        |
| clarkwinkelmann-circle-groups     | 1.0.0       |        |
| clarkwinkelmann-author-change     | 1.0.2       |        |
| blomstra-horizon                  | 0.2-beta.2  |        |
| askvortsov-markdown-tables        | v1.2.1      |        |
| askvortsov-discussion-templates   | v0.8.3      |        |
| afrux-top-posters-widget          | v0.1.3      |        |
| afrux-online-users-widget         | v0.1.5      |        |
| afrux-news-widget                 | v0.1.0      |        |
| afrux-forum-stats-widget          | dev-main    |        |
+-----------------------------------+-------------+--------+
Base URL: discuss.***.com
Installation path: /www/wwwroot/discuss.***.com
Queue driver: redis
Mail driver: smtp
Debug mode: off