# Polls causing issues

**URL:** https://meta.discourse.org/t/polls-causing-issues/315088
**Category:** Bug
**Tags:** polls, fixed
**Created:** [July 5, 2024, 6:17am UTC](https://meta.discourse.org/t/polls-causing-issues/315088 "2024-07-05T06:17:10Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Chief-Engineer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chief-engineer/32/381576_2.png) [@Chief-Engineer](https://meta.discourse.org/u/Chief-Engineer)
#### Post date: [July 5, 2024, 6:17am UTC](https://meta.discourse.org/t/polls-causing-issues/315088/1 "2024-07-05T06:17:10Z")

</div>

I’ve just noticed an issue with topics that contain a poll. This is on `3.3.0.beta4-dev (a30a861546)`. Many interactions break on what seems to be the entire topic for some topics. It seems to only happen if the topic contains a poll and the poll hasn’t been voted in by the viewing user. Some of the specific things I noticed:

- Polls do not have the button for the moderation menu that lets you do things like close the poll or export results
- The admin actions menu for posts doesn’t appear when the button is pressed
- The admin actions menu for the topic does appear, but doesn’t go away if you tried to open a post menu first
- Clicking on user profile pictures does nothing if you tried to open a post admin actions menu first

These issues all go away on topics without polls and if you disable the `poll enabled` site setting or enable [safe mode](https://meta.discourse.org/t/53504?silent=true) with `?safe_mode=no_plugins`. The following exception appears when loading the site:

```plaintext
Uncaught (in promise) TypeError: e[b].getValue(...) is not a function
    at Object.evaluate (runtime.js:1668:1)
    at Object.evaluate (runtime.js:1052:1)
    at It.evaluateSyscall (runtime.js:4204:1)
    at It.evaluateInner (runtime.js:4175:1)
    at It.evaluateOuter (runtime.js:4168:1)
    at Wt.next (runtime.js:4999:1)
    at Wt._execute (runtime.js:4986:1)
    at Wt.execute (runtime.js:4979:1)
    at Ut.handleException (runtime.js:4313:1)
    at Vt.handleException (runtime.js:4521:1)
    at Dt.throw (runtime.js:4260:1)
    at Ve.evaluate (runtime.js:2106:1)
    at Dt._execute (runtime.js:4247:1)
    at Dt.execute (runtime.js:4232:1)
    at qt.rerender (runtime.js:4547:1)
    at hr.render (index.js:4674:1)
    at index.js:4934:1
    at Nt (runtime.js:4080:1)
    at gr._renderRoots (index.js:4916:1)
    at gr._renderRootsTransaction (index.js:4960:1)
    at gr._revalidate (index.js:4992:1)
    at invoke (backburner.js.js:280:1)
    at h.flush (backburner.js.js:197:1)
    at p.flush (backburner.js.js:358:1)
    at B._end (backburner.js.js:798:1)
    at B.end (backburner.js.js:589:1)
    at B._run (backburner.js.js:842:1)
    at B._join (backburner.js.js:819:1)
    at B.join (backburner.js.js:629:1)
    at Array.<anonymous> (index.js:4765:1)
    at B._trigger (backburner.js.js:896:1)
    at B._end (backburner.js.js:811:1)
    at B._boundAutorunEnd (backburner.js.js:523:1)

```

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 5, 2024, 7:23am UTC](https://meta.discourse.org/t/polls-causing-issues/315088/2 "2024-07-05T07:23:44Z")

</div>

Thanks for the report. I’m looking into this and will aim to PR a fix asap.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 5, 2024, 8:47am UTC](https://meta.discourse.org/t/polls-causing-issues/315088/3 "2024-07-05T08:47:47Z")

</div>

PR raised:

[https://github.com/discourse/discourse/pull/27732](https://github.com/discourse/discourse/pull/27732)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 5, 2024, 12:04pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/4 "2024-07-05T12:04:51Z")

</div>

@Chief-Engineer this fix has now ticked-through to `tests-passed`. I performed a Production checkout and hopefully you will be good to go now.

Please let me know if you find any more issues in Polls.

Please note that option text wrapping formatting behaviour is a known issue and a proposed fix has already been raised as a PR which is currently pending review:

[https://github.com/discourse/discourse/pull/27738](https://github.com/discourse/discourse/pull/27738)

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [July 5, 2024, 1:20pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/5 "2024-07-05T13:20:52Z")

</div>

Thanks for the seriously quick fix @merefield😃

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [July 5, 2024, 1:50pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/6 "2024-07-05T13:50:18Z")

</div>

All polls with images in them have broken 🤔

(both old and new)

They display ok in the composer window:

 ![Screenshot 2024-07-05 at 14.47.50](https://global.discourse-cdn.com/meta/original/4X/2/c/c/2cc89f5ec2aec00a6de193720796943ea12aacad.jpeg)

But are very broken when viewing the topic normally:

 ![Screenshot 2024-07-05 at 14.47.24](https://global.discourse-cdn.com/meta/original/4X/a/f/3/af3282d72e7524385122b0536a1e7ca45af86881.jpeg)

Looks like it’s also broken here on Meta too:

[Images polls - #2 by Arkshine](https://meta.discourse.org/t/images-polls/309252/2)

Is this related?

Or a new issue?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 5, 2024, 2:05pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/7 "2024-07-05T14:05:09Z")

</div>

Very interesting … is this a documented feature? Can you point me to that?

… not a _single_ test is failing, were these supported by accident?

Polls was very recently moved to Glimmer so there’s been a _lot_ of change to the front end (more or less a rewrite of the FE)

But this migration only took place this week, and not back in May so I don’t think this migration was the first appearance of that issue.

I’ll take a look when I have time to see if it’s straightforward to add support.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [July 5, 2024, 2:25pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/8 "2024-07-05T14:25:00Z")

</div>

It seems there are some polls in this [documentation topic](https://meta.discourse.org/t/creating-and-managing-polls/77548) that are broken now. The dates, for example, are not displayed correctly.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [July 5, 2024, 2:33pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/9 "2024-07-05T14:33:19Z")

</div>

That topic makes it look like image polls were at least somewhat officially supported for a while:

> [@Creating and managing polls](https://meta.discourse.org/t/creating-and-managing-polls/77548/1):
>
> Polls can even include images! When including images in polls you may wish to adjust the image size to avoid overly large images.
> 
> ```plaintext
> [poll type=regular]
> * ![image|690x458, 100%](upload://2u570X7kQiPJQaJD1Bd8MLDHDNB.jpeg)
> * ![image|690x334, 100%](upload://35fmeFw8RMywSxIc4lbCb8UHPaT.jpg)
> * ![image|690x499, 100%](upload://xSDkRwmuj1pNc2QXKzthfXRlwsX.jpg)
> [/poll]
> 
> ```
> 
> _Poll ([view on site](https://meta.discourse.org/t/polls-causing-issues/315088/9))_
> 
> ```plaintext
> [poll type=regular]
> * Cat: a small domesticated carnivorous mammal with soft fur, a short snout, and retractile claws.
> ![image|690x458,25%](upload://2u570X7kQiPJQaJD1Bd8MLDHDNB.jpeg)
> * Dog: a domesticated carnivorous mammal that typically has a long snout, an acute sense of smell, and a barking, howling, or whining voice.
> ![image|690x334,25%](upload://35fmeFw8RMywSxIc4lbCb8UHPaT.jpg)
> * Fish: a limbless cold-blooded vertebrate animal with gills and fins and living wholly in water.
> ![image|690x499,25%](upload://xSDkRwmuj1pNc2QXKzthfXRlwsX.jpg)
> [/poll]
> 
> ```
> 
> _Poll ([view on site](https://meta.discourse.org/t/polls-causing-issues/315088/9))_
> 
> * * *

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 5, 2024, 2:33pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/10 "2024-07-05T14:33:44Z")

</div>

Sure, thanks for showing me that.

Let’s not debate this further, I’ll try to add back support … thanks for your patience.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [July 7, 2024, 1:57pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/11 "2024-07-07T13:57:58Z")

</div>

fix has been merged

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [July 7, 2024, 1:58pm UTC](https://meta.discourse.org/t/polls-causing-issues/315088/12 "2024-07-07T13:58:01Z")

</div>


