Automattic / crowdsignal-forms

Gutenberg blocks for Crowdsignal
GNU General Public License v2.0
13 stars 8 forks source link

Poll Block: Endless "Connect to Crowdsignal" prompt #182

Open retnonindya opened 3 years ago

retnonindya commented 3 years ago

Quick summary

When users creating polls, they added Poll block and keep getting prompted to connect their website to Crowdsignal, despite them already logging in to Crowdsignal and connect their WPCOM account to Crowdsignal. This also affects older Poll blocks/Crowdsignal-related blocks (Applause, Vote, NPS, and Feedback)

Steps to reproduce

Check whether you're already connected to CrowdSignal or not, at https://wordpress.com/me/security/connected-applications, and test for both cases.

  1. Create new post/page
  2. Add Poll block
  3. Notice how the block blinks in a matter of seconds and display "You need to connect to a Crowdsignal account to collect and manage your results." Screenshot 2021-09-26 at 3 00 00 PM

Clicking "Connect to Crowdsignal" will leads us to this page: https://WEBSITEADDRESS.wordpress.com/wp-admin/admin.php?page=crowdsignal-forms-setup

... With a warning:

The page requested does not exist
The page you requested does not exist, or you do not have have the necessary privileges to access it. 

What you expected to happen

The Poll block to work and folks able to create polls

What actually happened

Unable to create poll

Context

User report: 4325051-zd-woothemes

And test site.

Operating System

No response

Browser

No response

Simple, Atomic or both?

Simple

Theme-specific issue?

No response

Other notes

No response

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

No response

Workaround details

No response

mrfoxtalbot commented 3 years ago

Noting that I am getting the exact opposite result on the two tests I made (simple sites):

The block is visible in the editor but NOT in the published post.

Screen Shot on 2021-09-26 at 09:46:18

Also, there is a dedicated repo where some of these Crowdsignal block issues seem to be reported: https://github.com/Automattic/crowdsignal-forms/

I am not saying we should necessarily move it there, but it is good to keep it in our radar, for duplicates or related issues.

mrfoxtalbot commented 3 years ago

I replaced the previous poll block with a new one and it does seem to have worked now:

Screen Shot on 2021-09-26 at 09:49:17

inaikem commented 3 years ago

@retnonindya, I was unable to replicate on my test site (with or without CrowdSignal connected initially).

Can you confirm if the issue is still present for you? If so, we can move it to the Crowdsignal repo.

retnonindya commented 3 years ago

Eh.

Wait.

Why so weird.

My test site: premiumtestsite2.corianderpho.blog -- has Poll block working. Blog ID: 154340455

This test site: premiumtestsite.corianderpho.blog -- has Poll block not working. Blog ID: 153295757

Does this mean this issue affecting a fraction of blogs with specific characteristics? From a quick glance, I don't see anything different between the two, except the website premiumtestsite2.corianderpho.blog has enable-gallery-block-refactor sticker on it (for testing new Gallery block.)

@inaikem -- Certainly! Feel free to move this issue to Crowdsignal repo so the developers can check. Thank youuu 🙇

pauljacobson commented 3 years ago

Hi there. We have another instance of this issue in 4332434-zen where a user sees the same prompt to connect to Crowdsignal in the editor using a Poll Block:

Capture_2021-09-29 at 14 33 20@2x

At the same time, the polls do render in the preview:

Capture_2021-09-29 at 14 33 01@2x

It's worth pointing out the following:

CGastrell commented 3 years ago

Hey there!

We're still tracking this issue to get how is this happening, but it reduces to the API KEY that links the WP account and the Crowdsignal account changing without us knowing. The process is extent and has multiple entry points.

In the mean time, fixing this should be as easy as deleting the API KEY stored as a blog option. I can do it, but maybe it's better to test this on a single blow (delete then re-create the link) while working on the user's site.

@retnonindya Could you try deleting the crowdsignal_user_code option for this user, then create a test Poll block again (the API KEY acquirement process should just start over and be correctly set):

wp option delete crowdsignal_user_code --url=tagn.wordpress.com

@pauljacobson Same as @retnonindya , but with a different URL.

wp option delete crowdsignal_user_code --url=belliepronti.wordpress.com

Does this mean this issue affecting a fraction of blogs with specific characteristics? From a quick glance, I don't see anything different between the two, except the website premiumtestsite2.corianderpho.blog has enable-gallery-block-refactor sticker on it (for testing new Gallery block.)

I'd say it's more dependent on the user that on the blog. The link is created as soon as you publish your first Crowdsignal Forms block on the blog. As to why it worked fine on one site but not the other, that's what we're trying to figure out :)

retnonindya commented 3 years ago

@CGastrell Thanks for looking into this! Unfortunately, I don't have sandbox access. Is it possible if you folks run the command from your sandbox? 🙇 Thank you.

Also, we received another report about this issue: 4363078-zd-woothemes (website: joannapreston.com (jopre.wordpress.com))

retnonindya commented 3 years ago

@druesome helped me on running the sandbox for the sites and I can see the Poll blocks again! I'm going to inform/update the users.

retnonindya commented 3 years ago

Both users replied, and informed that the Poll block is back -- that's good. However, they also mentioned some issues:

Ticket 1: 4369937-zd-woothemes Ticket 2: 4363078-zd-woothemes

Polls still don't work from the Classic editor, but I expected that.

Then, both users informed they can't see the previous poll's results.

The first user mentioned:

If I go to Feedback->Crowdsignal on the dashboard it is still basically an ad for Crowdsignal. Is that what it is supposed to do? It feels like there should be more there than that.

The second user mentioned:

when I click on the block that the poll is in, and click on the “Results > Viiew Results” button I get taken to a Crowdsignal page with the message “You need access to view this Crowdsignal page. Please ask the project owner for access to a Team account.”

I wonder if this is because we have "new"(ish) connection after our wp option is deleted.

CC. @CGastrell

CGastrell commented 3 years ago

@retnonindya

First user not finding content on WP Admin: at some point the only poll he had got deleted (archived). If he goes into his Crowdsignal account dashboard (app.crowdsignal.com), he can log in with the usual WP credentials. There he can un-archive the poll if he wants. Or, with much less hassle, simply create a post and insert a new poll there. The newly created poll will appear when he/she visits Feedback -> Crowdsignal menu. We don't show archived polls there. Shall he/she want to "close" a poll without deleting/archiving it, that is doable from the poll block options on the right sidebar: image

Second user: I need to look a little deeper into this one, seems like a really old user who never got migrated to a new account (on Crowdsignal side of things), let me get back to you on this.

filipanoscampos commented 3 years ago

Hi @CGastrell Are there any updates on this issue for the second user regarding their Crowdsignal account? We would like to give them an update sometime this week. Thank you!

CGastrell commented 3 years ago

Hi @filipanoscampos

We're looking into it, we need to unravel where all this out-of-sync issue starts. I don't think we'll have something "sometime this week", but in the meantime we've located the original account of the users and all their content is safe, it's just the backend-to-backend connection that is failing.

In both these cases we need to link their WP account to their original Crowdsignal account so they can seamlessly access the same content on both ends.

CGastrell commented 3 years ago

4369937-zd-woothemes Has been addressed by manually merging Crowdsignal accounts. Please confirm this before contacting the user by:

cc: @filipanoscampos @retnonindya

jamiepalatnik commented 3 years ago

4369937-zd-woothemes Has been addressed by manually merging Crowdsignal accounts. Please confirm this before contacting the user by:

  • Going to Feedback -> Crowdsignal menu on wp-admin, user content should be listed
  • Create a Poll block from the site, should not show any errors
  • Once the post with a Poll block is saved, try visiting the Results page (from the Poll block sidebar), should, albeit empty, show the results page without any errors

I tested this and it worked for me, so I followed up with the user to let them know. Thanks!

CGastrell commented 3 years ago

4363078-zd-woothemes Has been addressed by manually merging Crowdsignal accounts. Please confirm this before contacting the user by:

cc: @filipanoscampos @retnonindya @jamiepalatnik

jamiepalatnik commented 3 years ago

4363078-zd-woothemes Has been addressed by manually merging Crowdsignal accounts. Please confirm this before contacting the user by:

  • Going to Feedback -> Crowdsignal menu on wp-admin, user content should be listed
  • Create a Poll block from the site, should not show any errors
  • Once the post with a Poll block is saved, try visiting the Results page (from the Poll block sidebar), should, albeit empty, show the results page without any errors

I tested this and all looks good, so I notified this user as well. Thank you!