I'm using Freeflarum; so I'll get back to you whenever we get an update on there - Thank you though!

Hi, I created a test achievement. But I do not see any option to disable it. It would be nice to know how to do it.

There is no edit option too. I missed adding an image URL while testing. Thanks.

2 months later
23 days later

The following error appears when using show-post-footer feature on one FreeFlarum forum:

Location of the bug in the source (line 101):

Flarum info:

Flarum core 1.1.0
PHP version: 8.0.9
MySQL version: 5.5.5-10.6.3-MariaDB-1:10.6.3+maria~focal
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, gmp, iconv, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, Zend OPcache
+-------------------------------+---------+--------+
| Flarum Extensions             |         |        |
+-------------------------------+---------+--------+
| ID                            | Version | Commit |
+-------------------------------+---------+--------+
| flarum-flags                  | v1.1.0  |        |
| flarum-markdown               | v1.1.0  |        |
| afrux-forum-widgets-core      | v0.1.5  |        |
| flarum-tags                   | v1.1.0  |        |
| flarum-suspend                | v1.1.0  |        |
| flarum-sticky                 | v1.1.0  |        |
| flarum-nicknames              | v1.1.0  |        |
| flarum-lock                   | v1.1.0  |        |
| flarum-approval               | v1.1.0  |        |
| flarum-likes                  | v1.1.0  |        |
| flarum-bbcode                 | v1.1.0  |        |
| therealsujitk-gifs            | v4.1.1  |        |
| afrux-online-users-widget     | v0.1.5  |        |
| acpl-mobile-tab               | 1.0.5   |        |
| kilowhat-audit-free           | 1.4.2   |        |
| fof-user-directory            | 1.0.2   |        |
| clarkwinkelmann-group-list    | 1.0.0   |        |
| fof-bbcode-details            | 1.0.0   |        |
| ianm-synopsis                 | 1.0.1   |        |
| v17development-blog           | 0.4.2   |        |
| fof-links                     | 1.0.3   |        |
| fof-default-group             | 1.0.0   |        |
| sycho-profile-cover           | v1.3.0  |        |
| migratetoflarum-canonical     | 1.0.0   |        |
| fof-default-user-preferences  | 1.0.0   |        |
| fof-sitemap                   | 1.0.2   |        |
| flarum-subscriptions          | v1.1.0  |        |
| flarum-statistics             | v1.1.0  |        |
| flarum-mentions               | v1.1.1  |        |
| flarum-lang-english           | v1.1.0  |        |
| flarum-emoji                  | v1.1.0  |        |
| askvortsov-categories         | v3.0.4  |        |
| fof-user-bio                  | 1.0.0   |        |
| fof-profile-image-crop        | 1.0.0   |        |
| fof-drafts                    | 1.0.3   |        |
| malago-achievements           | 0.5.0   |        |
| fof-polls                     | 1.0.3   |        |
| clarkwinkelmann-author-change | 1.0.1   |        |
| fof-stopforumspam             | 1.1.1   |        |
| askvortsov-rich-text          | v2.1.0  |        |
| nearata-no-self-likes         | v1.2.0  |        |
| fof-formatting                | 1.0.1   |        |
| fof-ban-ips                   | 1.0.0   |        |
| the-turk-stickiest            | 2.0.3   |        |
| katosdev-signature            | 1.1.3   |        |
| afrux-news-widget             | v0.1.0  |        |
| miniflar-bbcode-progress-bars | 1.0.1   |        |
+-------------------------------+---------+--------+

Reference: https://discuss.flarum.org/d/7585/3145

    SKevo Thanks for the report. I am trying to install all those extensions and see what causes the issue. No luck so far but I have a few more to try... Any idea where it might be coming from?

    SKevo Try to upgrade to flarum core 1.1.1 and check if it will solve that issue.

    i can't use the extension because i get an error, i can't suspend an user if achievements is enabled

    I use the version 0.5.0 and I don't have any error.
    And, I can suspend an user (I tested, I suspended one user for one day)

      For the moment, my POC have (too many) extensions:

      Flarum core 1.1.1
      PHP version : 7.4.21
      MySQL version: 
      5.5.5-10.3.29-MariaDB-0+deb10u1-log                                  
      Loaded extensions: Core, date, libxml, openssl, pcre, zlib,
      filter, hash, pcntl, Reflection, SPL, session, standard, 
      sodium, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, 
      ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, 
      gettext, gmp, gnupg, iconv, igbinary, imagick, 
      imap, intl, json, exif, msgpack, mysqli, pdo_mysql, 
      pdo_sqlite, apc, posix, ps, readline, redis, shmop, 
      SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, 
      tidy, tokenizer, xmlreader, xmlwriter, xsl, zip, Phar, 
      memcached, Zend OPcache                              
      +------------------------------------+---------+--------+
      | Flarum Extensions                  |         |        |
      +------------------------------------+---------+--------+
      | ID                                 | Version | Commit |
      +------------------------------------+---------+--------+
      | flarum-suspend                     | v1.1.0  |        |
      | flarum-subscriptions               | v1.1.0  |        |
      | flarum-tags                        | v1.1.0  |        |
      | flarum-flags                       | v1.1.0  |        |
      | flarum-lock                        | v1.1.0  |        |
      | fof-sitemap                        | 1.0.2   |        |
      | askvortsov-auto-moderator          | v0.1.2  |        |
      | flarum-sticky                      | v1.1.0  |        |
      | flarum-likes                       | v1.1.0  |        |
      | afrux-forum-widgets-core           | v0.1.5  |        |
      | fof-formatting                     | 1.0.1   |        |
      | fof-user-directory                 | 1.0.2   |        |
      | fof-follow-tags                    | 1.0.1   |        |
      | fof-impersonate                    | 1.0.0   |        |
      | flarum-approval                    | v1.1.0  |        |
      | flarum-markdown                    | v1.1.0  |        |
      | v17development-blog                | 0.4.2   |        |
      | zerosonesfun-direct-links          | 3.0.1   |        |
      | zerosonesfun-bbcode-advanced-image | 0.3     |        |
      | webbinaro-calendar                 | 1.0.0   |        |
      | v17development-user-badges         | v0.2.1  |        |
      | v17development-seo                 | v1.8.0  |        |                          
      | the-turk-stickiest                 | 2.0.3   |        |                       
      | the-turk-quiet-edits               | 0.1.3   |        |
      | sycho-profile-cover                | v1.3.0  |        |
      | serakoi-hideprofile                | 0.0.6   |        |
      | ramesh-dada-realtime               | 100.1   |        |
      | nearata-tags-color-generator       | v2.0.0  |        |
      | nearata-no-self-likes              | v1.2.0  |        |
      | miniflar-top-like-givers-widget    | 0.1.0   |        |
      | miniflar-bbcode-progress-bars      | 1.0.1   |        |
      | miniflar-admin-notepad-widget      | 1.0.0   |        |
      | mickmelon-coloured-usernames       | 0.1.1   |        |
      | malago-fancybox                    | 0.3.0   |        |
      | malago-achievements                | 0.5.0   |        |                                                                                                                       
      | justoverclock-welcomebox           | 1.3.3   |        |
      | justoverclock-readmore             | 1.0.4   |        |
      | justoverclock-hot-discussions      | 0.1.2   |        |
      | justoverclock-edit-posts           | 0.1.1   |        |
      | ianm-synopsis                      | 1.0.1   |        |
      | ianm-syndication                   | 1.0.2   |        |
      | ianm-follow-users                  | 1.0.3   |        |
      | ganuonglachanh-search              | 0.5.1   |        |
      | fof-user-bio                       | 1.0.0   |        |
      | fof-upload                         | 1.0.5   |        |
      | fof-terms                          | 1.1.1   |        |
      | fof-subscribed                     | 1.0.0   |        |
      | fof-secure-https                   | 1.0.0   |        |
      | 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-pages                          | 1.0.1   |        |
      | fof-moderator-notes                | 1.0.0   |        |
      | fof-merge-discussions              | 1.0.0   |        |
      | fof-masquerade                     | 1.0.0   |        |
      | fof-links                          | 1.0.3   |        |
      | fof-frontpage                      | 1.0.1   |        |
      | fof-drafts                         | 1.0.3   |        |
      | fof-doorman                        | 1.0.0   |        |
      | fof-disposable-emails              | 1.0.0   |        |
      | fof-custom-footer                  | 1.0.0   |        |
      | fof-cookie-consent                 | 1.0.1   |        |
      | fof-byobu                          | 1.0.1   |        |
      | fof-best-answer                    | 1.1.5   |        |
      | fof-bbcode-tabs                    | 1.0.0   |        |
      | fof-bbcode-details                 | 1.0.0   |        |
      | flarumite-simple-spoilers          | 1.0.0   |        |
      | flarum-statistics                  | v1.1.0  |        |
      | flarum-nicknames                   | v1.1.0  |        |
      | flarum-mentions                    | v1.1.0  |        |
      | flarum-lang-french                 | v3.2.1  |        |
      | ffans-clipboardjs                  | v1.0.0  |        |
      | dem13n-topic-starter-label         | 0.1.7   |        |
      | dem13n-discussion-cards            | 0.3.8   |        |
      | clarkwinkelmann-who-read           | 1.4.0   |        |
      | clarkwinkelmann-shadow-ban         | 1.1.0   |        |
      | clarkwinkelmann-mailing            | 1.0.0   |        |
      | clarkwinkelmann-lock-likes         | 1.1.1   |        |
      | clarkwinkelmann-likes-received     | 1.0.0   |        |
      | clarkwinkelmann-group-list         | 1.0.0   |        |
      | clarkwinkelmann-circle-groups      | 1.0.0   |        |
      | clarkwinkelmann-bookmarks          | 1.0.0   |        |
      | clarkwinkelmann-author-change      | 1.0.1   |        |
      | blomstra-cache-assets              | 0.5     |        |
      | askvortsov-rich-text               | v2.1.0  |        |
      | askvortsov-pwa                     | v3.0.5  |        |
      | askvortsov-help-tags               | v1.1.0  |        |
      | askvortsov-discussion-templates    | v0.8.2  |        |
      | askvortsov-checklist               | v1.3.1  |        |
      | askvortsov-categories              | v3.0.4  |        |
      | askvortsov-article-series          | v0.1.0  |        |
      | afrux-online-users-widget          | v0.1.5  |        |
      | acpl-my-tags                       | 1.1.1   |        |
      | acpl-mobile-tab                    | 1.0.5   |        |
      +------------------------------------+---------+--------+

      I hope this can help you to found which one break your one.

        Lautre-f Justoverclock SKevo

        It looks like Flarum 1.1.1 changed something and broke the extension, it should be fixed on 0.5.1

        Update to 0.5.1 and let me know if the issue is solved!

        composer update malago/flarum-achievements

          Should I do the upgrade since this extension ever works fine to me?
          I will upgrade, for testing purpose.

          Thanks

          malago thanks for the fast fix, I will now update it at FreeFlarum

          23 days later

          I think this extension should remove the code "console.log(comment);"
          File: vendor/malago/flarum-achievements/js/src/forum/index.js
          Line: 101

              if (here == "1" && !this.attrs.post.data.attributes.isHidden) {
                this.attrs.post.data.attributes.achievements.forEach(function (item, index) {
                  var rectangle = item.rectangle.split(',');
                  if (item.image.includes("http")) {
                    var style = "background:url(" + item.image + ");\
                      background-position:-"+ rectangle[0] + "px -" + rectangle[1] + "px;\
                      height:"+ rectangle[2] + "px;\
                      width:"+ rectangle[3] + "px;\
                      margin: -"+ (rectangle[3] / 4 - 4) + "px;";
                    console.log(comment);
                    comment.children[0].children[2].children.push(m(Tooltip, { text: item.name },
                      m("span.Badge.Achievement", { style: style }, ""))
                    );
                  } else {
                    comment.children[0].children[2].children.push(m(Tooltip, { text: item.name }, m("span.Badge.Achievement--Icon",
                      m("i.icon." + item.image))
                    ));
                  }

            Joe_Zhu Thanks for finding it! They are really sneaky 🙂

            Update to 0.5.2 to get rid of that console.log!

            2 months later

            is it compatible with last version? I get an error on console.

              fakruzaruret I don't see any error on the console on my testing site (on 1.2.0 now). Could you tell me exactly on which line it appears, I might be able to find where it is that way.

              It is not line 130, but if you click on that link it will tell you what line. You can screenshot it or copy and paste.

              Thanks!