Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Crowdsignal: Vote and Applause Widget Blocks Not Storing Data #62069

Open eduardozulian opened 2 years ago

eduardozulian commented 2 years ago

Quick summary

When you add a Vote or Applause block to a widget, the voting is not stored.

Steps to reproduce

  1. On a site using Widget Blocks, go to the Widget section
  2. Add a new block
  3. Choose either the Vote or the Applause block. If testing with an AT site, you'll need to install https://wordpress.org/plugins/crowdsignal-forms/
  4. Save it
  5. Visit your site
  6. Try to hit thumbs up/down or the applause icon
  7. Notice that we count the vote/applause
  8. Refresh the page
  9. Numbers are gone

What you expected to happen

That we store that data somehow. If it's on a widget, we may consider adding that voting score to the blog/site itself.

What actually happened

Context

4860430-zen

Simple, Atomic or both?

Simple, Atomic

Theme-specific issue?

No response

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

No response

Workaround details

No response

kimerlin81 commented 2 years ago

I was able to reproduce this behavior for the Vote and Applause widget blocks on a simple and atomic test site: Screen Capture on 2022-04-14 at 07-26-29

It seems these Crowdsignal features were designed to save/display results when a post is published. Screenshot on 2022-04-14 at 07-33-27

Screenshot on 2022-04-14 at 07-39-01

The results for both blocks saved when added to a published post: Screen Capture on 2022-04-14 at 07-35-02

Triaging this issue for further review

cometgrrl commented 2 years ago

@Automattic/crowdsignal Can someone from Crowdsignal take a look at this?

CGastrell commented 2 years ago

We've identified the issue: Thanks @kimerlin81

the plugin uses a hook that is not triggered while editing template parts. Polls do not work either on these FSE template parts. No ETA yet.

danielbachhuber commented 2 years ago

Another report in #63637

I did a more detailed technical analysis here: https://github.com/Automattic/wp-calypso/issues/63637#issuecomment-1170529033