Add configuration to disable checking votes on page build

Created on 30 January 2017, over 7 years ago
Updated 27 March 2024, 6 months ago

If pages are cached, then the wrong user's vote (or lack of vote) may determine whether the "thumbs up" or "thumbs down" icon is highlighted when the page is built.

With Drupal 8's dynamic cache, this may be a problem even for authenticated users. If anonymous users are allowed to vote, then this problem comes up when using the internal page cache or an external one, like Varnish.

One solution would be to use an AJAX callback to get the correct user's voting status. I think the Big Pipe module supports this. High-traffic sites might not want to use this solution, since the point of caching is that they want to avoid bootstrapping Drupal on every page load.

A simpler solution is to offer a configuration option to disable checking for votes when loading a page. This means that there would be no visible clue when a user returns to a page that he or she had previously rated. The highlighting will still appear when the visitor votes.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

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

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.71.5 2024