Button "View poll" is missing for authenticated users

Created on 21 October 2020, over 3 years ago
Updated 24 March 2024, 3 months ago

Problem/Motivation

When a poll is configured to allow to view the results before voting, on the poll form a button "View results" disappear.

When going to the poll results as anonymous user (when the poll accepts anonymous votes), a button called "View poll" appears.
But when going to the poll as authenticated user, there is no "View poll" button.

I found out that this bug was introduced in #2944773: View poll button .

Additionally, there is a PHP notice when an authenticated user goes to the poll results before voting, but that's a different bug. And that one only occurs on later PHP versions, so it seems. I shall create a separate issue for this.

I noticed this issue while working on #3178162: Serialization error when switching between poll form and poll results as an anonymous user on PHP 7.4 and there it causes the tests to be less consistent.

Steps to reproduce

  1. Create a poll that allows to view the results before voting.
  2. As an authenticated user, go to the poll. The poll form gets displayed.
  3. Click the "View results" button. The poll vote results get displayed.

There is no "View poll" button, while there is one when accessing the poll as anonymous user.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

A patch with tests will follow. The posted test is similar to the one posted in #3178162: Serialization error when switching between poll form and poll results as an anonymous user on PHP 7.4 .

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands MegaChriz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024