Project

General

Profile

Bug #14142

Can't add Twitter widget to profile

Added by Raffi Khatchadourian 9 months ago. Updated 7 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Commons Profile
Target version:
Start date:
2021-03-09
Due date:
% Done:

0%

Estimated time:

Description

I tried to add the Twitter widget to my CAC profile a few times. When I hit save, it goes away.

Screenshot_2021-03-09_12-47-34.png (11.5 KB) Screenshot_2021-03-09_12-47-34.png Boone Gorges, 2021-03-09 01:47 PM
Screenshot from 2021-03-09 14-32-07.png (22.6 KB) Screenshot from 2021-03-09 14-32-07.png No title Raffi Khatchadourian, 2021-03-09 02:32 PM
Screenshot from 2021-03-09 14-33-23.png (25.6 KB) Screenshot from 2021-03-09 14-33-23.png With title Raffi Khatchadourian, 2021-03-09 02:33 PM
out.ogv (9.17 MB) out.ogv Screencast Raffi Khatchadourian, 2021-03-09 02:57 PM
Screen Recording 2021-03-09 at 6.57.34 PM.mov (44.2 MB) Screen Recording 2021-03-09 at 6.57.34 PM.mov Marilyn Weber, 2021-03-09 07:01 PM

History

#1 Updated by Boone Gorges 9 months ago

Are you filling in a title for the widget? See screenshot, where it says 'TWITTER'.

#2 Updated by Raffi Khatchadourian 9 months ago

I tried with and without the widget title. Both didn't save.

#3 Updated by Boone Gorges 9 months ago

Seems to be working OK for me. I can see a number of places where things might go wrong. It might be helpful if you could share a short video of what you're doing. You might also consider opening your browser console to see if there are any obvious errors that might give me a place to begin investigating.

#5 Updated by Raffi Khatchadourian 9 months ago

Boone Gorges wrote:

Seems to be working OK for me. I can see a number of places where things might go wrong. It might be helpful if you could share a short video of what you're doing. You might also consider opening your browser console to see if there are any obvious errors that might give me a place to begin investigating.

No errors that I can see.

#6 Updated by Boone Gorges 9 months ago

Thanks for the additional info. Marilyn, would you mind seeing whether you can reproduce Raffi's problem on your own profile? I'm not sure where to go next without reproducible steps.

#7 Updated by Raffi Khatchadourian 9 months ago

Sorry, I am not very good with the screen recordings. I've attached one. It's a bit fast, so you may need to pause it (sorry about that). It can be played with the VLC video player, which is free to download.

#8 Updated by Boone Gorges 9 months ago

Thanks, this is helpful. I'm not seeing the same behavior in my own case, but hopefully Marilyn can reproduce so that I can have something to test with.

#9 Updated by Marilyn Weber 9 months ago

I am able to reproduce this problem. It worked the first time when I entered MarilynWeberGC. Then I noticed that Raff didn't use the , so I tried again without it. Now, whether I use the @ or not, it will not stick - exactly as Raffi's video shows.

#10 Updated by Marilyn Weber 9 months ago

Wait, what! I see my reply above has left out the AT symbol before my name, which kinda was the whole point. It worked with the AT symbol. Then I tried without and it didn't work. So I tried again with and that didn't fix it. Trying one final time didn't work either.

I'm going to guess I am hard to follow here. I will try this with another identity (username conduit) and I will record it.

#11 Updated by Marilyn Weber 9 months ago

Here is my recording. It seems that you can add Twitter to your profile only once. If you remove it, then try again, it won't stick.

#12 Updated by Boone Gorges 9 months ago

  • Status changed from New to Reporter Feedback
  • Target version set to 1.18.7

Thanks, Marilyn. I had to test a couple different user accounts but I was finally able to reproduce.

The root issue is kind of in-the-weeds, having to do with the fact that the Twitter widget's data is stored using a WP function that returns false if you call it using the same data as what's already stored in the database, which the profile plugin was interpreting as a failed save. As such, if you had a Twitter widget on your profile, then deleted it, then tried to add the very same widget, it would fail in the way described here. I've fixed the issue in https://github.com/cuny-academic-commons/cac-advanced-profiles/commit/c3da281354864bfc26fb56d1f526d6ec481eed35 and pushed to the production site if you'd like to give it a test.

#13 Updated by Raffi Khatchadourian 9 months ago

Marilyn Weber wrote:

Wait, what! I see my reply above has left out the AT symbol before my name, which kinda was the whole point. It worked with the AT symbol. Then I tried without and it didn't work. So I tried again with and that didn't fix it. Trying one final time didn't work either.

I'm going to guess I am hard to follow here. I will try this with another identity (username conduit) and I will record it.

Ha. I would not have thought to use the AT symbol. I believe that the prompt just asks for a username.

#14 Updated by Raffi Khatchadourian 9 months ago

Boone Gorges wrote:

Thanks, Marilyn. I had to test a couple different user accounts but I was finally able to reproduce.

The root issue is kind of in-the-weeds, having to do with the fact that the Twitter widget's data is stored using a WP function that returns false if you call it using the same data as what's already stored in the database, which the profile plugin was interpreting as a failed save. As such, if you had a Twitter widget on your profile, then deleted it, then tried to add the very same widget, it would fail in the way described here. I've fixed the issue in https://github.com/cuny-academic-commons/cac-advanced-profiles/commit/c3da281354864bfc26fb56d1f526d6ec481eed35 and pushed to the production site if you'd like to give it a test.

It works! Thanks, guys!

#15 Updated by Boone Gorges 9 months ago

  • Target version changed from 1.18.7 to 1.18.8

#16 Updated by Boone Gorges 8 months ago

  • Target version changed from 1.18.8 to 1.18.9

#17 Updated by Boone Gorges 7 months ago

  • Target version changed from 1.18.9 to 1.18.10

#18 Updated by Boone Gorges 7 months ago

  • Status changed from Reporter Feedback to Resolved

Also available in: Atom PDF