Why is there no result showing (percentages)?
We are using the latest version of both the extension and Flarum

(and yes there were several voters - can see them as admin)

Maybe it's a translation problem?

<div title="1 Stimme | [object Object] Stimmen" class="PollBar"><div style="--width: 0%;" class="PollOption-active"></div><label class="PollAnswer"><span>Klimakrise</span></label><label><span class="PollPercent PollPercent--option">0%</span></label></div>

    clarkwinkelmann Security: the vote results are now hidden from the API until the user votes or has the new "see vote results" permission

    Is this the permission "View results without voting"?
    It's set to users but even as admin I cannot see the results.

      phloo phloo do you see any error in the browser console? Can you share your php flarum info output?

      What happens when you click the "Show results" button? Admins should always see that button, and if you see the button it means you have the permission to see the results.

      The two issues are probably linked to a same error.

      no errors in the console

      there is no "show results" button?!

      Flarum core 1.0.3
      PHP version: 7.4.20
      Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, restrictdocroot, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, json, ldap, exif, mysqlnd, PDO, pgsql, Phar, posix, shmop, SimpleXML, soap, sockets, sodium, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlwriter, xsl, mcrypt, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, xmlreader, xmlrpc, apcu, decimal, gnupg, igbinary, imagick, mailparse, msgpack, psr, yaml, zip, mongodb, phalcon, redis, Zend OPcache
      +-------------------------------+--------------+------------------------------------------+
      | Flarum Extensions             |              |                                          |
      +-------------------------------+--------------+------------------------------------------+
      | ID                            | Version      | Commit                                   |
      +-------------------------------+--------------+------------------------------------------+
      | flarum-flags                  | v1.0.0       |                                          |
      | flarum-markdown               | v1.0.1       |                                          |
      | flarum-subscriptions          | v1.0.0       |                                          |
      | flarum-tags                   | v1.0.3       |                                          |
      | flarum-approval               | v1.0.0       |                                          |
      | flarum-suspend                | v1.0.0       |                                          |
      | fof-bbcode-details            | 1.0.0        |                                          |
      | therealsujitk-gifs            | v4.0.0       |                                          |
      | cadiducho-bbcode              | 1.0.3        |                                          |
      | flarum-lang-english           | v1.0.0       |                                          |
      | clarkwinkelmann-author-change | 1.0.1        |                                          |
      | flarum-pusher                 | v1.0.0       |                                          |
      | fof-stopforumspam             | 1.0.0        |                                          |
      | fof-doorman                   | 1.0.0        |                                          |
      | fof-reactions                 | 1.0.0        |                                          |
      | fof-pages                     | 1.0.1        |                                          |
      | flarum-statistics             | v1.0.0       |                                          |
      | flarum-sticky                 | v1.0.0       |                                          |
      | kanni-ext-supertopic          | dev-master   | 42297fcc5f00ceeacad51a46610cb6b51c84a899 |
      | fof-nightmode                 | 1.0.0        |                                          |
      | fof-merge-discussions         | 1.0.0        |                                          |
      | fof-linguist                  | 1.0.0        |                                          |
      | fof-ignore-users              | 1.0.0        |                                          |
      | fof-formatting                | 1.0.0        |                                          |
      | fof-follow-tags               | 1.0.1        | dafb08feefbecc0524dfe3d875957c709fd6e6fe |
      | fof-byobu                     | 1.0.0-beta.7 |                                          |
      | flarum-mentions               | v1.0.0       |                                          |
      | flarum-lock                   | v1.0.0       |                                          |
      | flarum-likes                  | v1.0.0       |                                          |
      | matteocontrini-imgur-upload   | v3.9.0       |                                          |
      | fof-user-directory            | 1.0.2        |                                          |
      | fof-user-bio                  | 1.0.0        |                                          |
      | fof-terms                     | 1.0.0        |                                          |
      | fof-subscribed                | 1.0.0        |                                          |
      | fof-split                     | 1.0.0        |                                          |
      | fof-polls                     | 1.0.2        |                                          |
      | flarum-bbcode                 | v1.0.0       |                                          |
      | flarum-lang-german            | 1.1.0        |                                          |
      | zerosonesfun-tldr             | 1.0.1        |                                          |
      +-------------------------------+--------------+------------------------------------------+
      Base URL: //ourdomain.com
      Installation path: /var/www/censored/html
      Debug mode: off

        phloo there is no "show results" button?!

        Isn't it the "Abstimmende anzeigen" button in the screenshot?

        • [deleted]

        @clarkwinkelmann I see the below in the console, although my issue is slightly different to @phloo in the sense that the poll shows, but not complete

        addPollToDiscussion.js:47 Uncaught (in promise) TypeError: Cannot read property 'main' of undefined
            at addPollToDiscussion.js:47

        For example, there are votes for multiple selections on this post https://metabullet.com/d/93-operating-system-preference but all the votes show as "Windows", which just isn't right as half of the votes are in fact for Linux, but do not show.

        This shows who voted for each option.

        As I stated before: the results should be visible as percentages (see screenshot)

          • [deleted]

          phloo My issue is pretty similar to yours I think, although a percentage shows for one value at least 🙂

          Same problem with polls, I haven't used it since 1.0, but if I open older polls posted with beta 15, everything is 0% now whereas the voters list is correct. No javascript error in the console.

            23 days later

            This is my first time with this extension.
            To install in a new forum 1.04 need to do all the OP tips: Installation, migrating, updating and metadata update?

            Or only go with installation code?
            composer require fof/polls

              3 months later

              SnakePromise I don't think so. This should be easy to change by forking the extension. I'm not sure if we want to add an option for that in the extension itself. We could inject the value in a second hidden DIV so that custom CSS can access it.

                hi,shall we add a Class here?
                I tried to do some custom one ,but the content without a Class or DIV-ID~
                image.png

                clarkwinkelmann I'd say it's a rather popular option in voting widgets. There could be 2 consecutive spans with "XX%" and "XX votes" to be hidden/shown with CSS.

                a month later

                1.0.4

                • Fix: Clicking a user from View voters caused a full page reload FriendsOfFlarum/polls50
                • Fix: Tooltip displayed NaN votes on desktop
                • Fix: Tooltip missing on mobile
                Updating
                composer require fof/polls:"*"
                php flarum cache:clear
                  a month later

                  Some mobile browser Nan votes problem and not showing vote radio box how to fix this problem

                  5 days later

                  1.0.5

                  Updating
                  composer require fof/polls:"*"
                  php flarum cache:clear

                    IanM Great! This is a bit off topic... but a while ago I started to notice the impact of using external content on the speed of a Flarum site, especially when stacking up external resources from multiple extensions.

                    In these months some extensions have stopped using external resources and the speed improvements have been surprising, as if by magic 🪄