Project

General

Profile

Actions

Bug #14142

closed

Can't add Twitter widget to profile

Added by Raffi Khatchadourian over 3 years ago. Updated over 3 years ago.

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

0%

Estimated time:
Deployment actions:

Description

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


Files

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
Actions #1

Updated by Boone Gorges over 3 years ago

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

Actions #2

Updated by Raffi Khatchadourian over 3 years ago

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

Actions #3

Updated by Boone Gorges over 3 years 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.

Actions #5

Updated by Raffi Khatchadourian over 3 years 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.

Actions #6

Updated by Boone Gorges over 3 years 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.

Actions #7

Updated by Raffi Khatchadourian over 3 years 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.

Actions #8

Updated by Boone Gorges over 3 years 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.

Actions #9

Updated by Marilyn Weber over 3 years 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.

Actions #10

Updated by Marilyn Weber over 3 years 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.

Actions #11

Updated by Marilyn Weber over 3 years 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.

Actions #12

Updated by Boone Gorges over 3 years 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.

Actions #13

Updated by Raffi Khatchadourian over 3 years 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.

Actions #14

Updated by Raffi Khatchadourian over 3 years 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!

Actions #15

Updated by Boone Gorges over 3 years ago

  • Target version changed from 1.18.7 to 1.18.8
Actions #16

Updated by Boone Gorges over 3 years ago

  • Target version changed from 1.18.8 to 1.18.9
Actions #17

Updated by Boone Gorges over 3 years ago

  • Target version changed from 1.18.9 to 1.18.10
Actions #18

Updated by Boone Gorges over 3 years ago

  • Status changed from Reporter Feedback to Resolved
Actions

Also available in: Atom PDF