Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippings no longer working with Twitter (X) #441

Closed
kstev99 opened this issue Feb 14, 2024 · 12 comments
Closed

Clippings no longer working with Twitter (X) #441

kstev99 opened this issue Feb 14, 2024 · 12 comments
Assignees
Milestone

Comments

@kstev99
Copy link

kstev99 commented Feb 14, 2024

I always relied on clippings to post Hashtags# or comments in twitter. Recently if I try to create a post or comment on an existing one, the text is not recognized and the SUBMIT button never becomes functional. If I type some text before inserting the clipping, then the post can be submitted, but ONLY the typed text is sent and the clipping in ignored.

This began a few weeks ago, and I'm not sure if it is attributed to the most recent FIREFOX version (122.01) with Twitter itself, or the clippings add-on but something has changed. The problem also occurs on Librewolf browser, a fork of Firefox

@aecreations
Copy link
Owner

I was able to reproduce this issue on Twitter/X using an older version of Firefox (102.15.1 ESR). It appears that, like many websites, they're now blocking mass pasting of text.

I'll look into this further -- but for now, a workaround is to copy the content of the desired clipping from Clippings Manager (select the text and press CTRL+C) and then paste it into the tweet composer. An enhancement is planned in a future version of Clippings to make this workaround a bit easier.

@kstev99
Copy link
Author

kstev99 commented Feb 20, 2024

Thanks, that's what I have been doing, copying the text from the Clippings manager

@aecreations
Copy link
Owner

I've confirmed that this is due to a change that was made in Clippings 6.5.2.1, where the DOM Range API is used to insert a clipping into an HTML editor. Previously, HTML-formatted clippings were inserted by making a call to document.execCommand("insertHTML", ...), which is considered deprecated (issue #436).

While this was tested on various HTML editors (TinyMCE, Gmail email composer, Yahoo! Mail composer), Twitter/X was missed. A minor update to fix this issue with Twitter is coming shortly.

The good news is that I kept the old code for pasting HTML-formatted clippings. Until the minor update of Clippings is released, do the following to revert to the old document.insertHTML() method:

  1. Open a new browser tab and go to about:debugging
  2. On the left sidebar, click "This Firefox"
  3. Under Extensions, locate Clippings in the list, and click Inspect to open Developer Tools
  4. Click the Storage tab, then expand Extension Storage
  5. Scroll to the bottom of the list and look for the key useInsertHTMLCmd. Set the value to true
  6. Return to the browser tab with the tweet composer, then reload the page and try pasting the clipping again.

@kstev99
Copy link
Author

kstev99 commented Feb 21, 2024

Thank you! Changing useInsertHTMLCmd to true worked for me in FF 122.01. Thanks for the detailed instructions.

@aecreations aecreations added this to the 6.5.2.2 milestone Feb 21, 2024
@aecreations
Copy link
Owner

Fixed in 6.5.2.2

@kstev99
Copy link
Author

kstev99 commented Apr 9, 2024

This fixed the problem for a while, but now on Firefox 124.02 it seems to be broken again. The copy and paste method works of course but clippings generates an error in "X". Do I need to change the value of useInsertHTMLCmd back to FALSE ?

@aecreations
Copy link
Owner

I'm unable to reproduce the problem - no error appears in Twitter/X, and the clipping is successfully inserted into the tweet composer. I'm using Clippings 6.5.3 on Firefox 124.0.2 on macOS 12.7.4 Monterey.

In Clippings 6.5.2.2 and newer, the document.execCommand("insertHTML", ...) API is always used to insert the clipping in the tweet composer on twitter.com (or x.com), regardless of the "useInsertHTMLCmd" setting.

@kstev99
Copy link
Author

kstev99 commented Apr 10, 2024

I should have mentioned that I was on the same, Firefox 124.02, clippings 6.5.3, but Windows 11
I just tried it again and ecery time that I try inserting a clipping on Twitter/X I get the error message:

Something Went Wrong. Try Reloading

@aecreations
Copy link
Owner

I don't have access to a PC with Windows 11, but I tried to reproduce the issue you described on Windows 10 and the same version of Firefox. Again, I'm unable to.

Do you have other Firefox extensions installed that might be interfering with Clippings?

Another possibility: You could be getting another version of the Twitter/X web UI - perhaps they're doing an A/B test on their users?

@kstev99
Copy link
Author

kstev99 commented Apr 11, 2024

I have too many Firefox extensions to list, I started disabling them one at a time and restarting, but gave up. Then I realized that I also have LibreWolf browser 124.01-1 installed (portable). If you're not familiar, it is a fork of Firefox browser with (supposedly) security and speed improvements. I believe the current is based on FF 124.01. I had a few extensions, and disabled ALL except for clippings. Logged into twiiter/x and same problem. "Something went wrong"
I also backed up my clippings, uninstalled clippings and reinstalled.

That leaves me wondering if it is something with my Windows 11 version. I am on Windows Insider 23H2 (OS Build 22635.3430)

@aecreations
Copy link
Owner

I've installed LibreWolf 124.0.1-1 on my Windows 10 PC and then added Clippings 6.5.3. Again, I'm unable to reproduce the Twitter/X error you described when the clipping was inserted. The clipping was successfully inserted without any error messages appearing:

image

image

I've tried inserting using the Clippings context menu, as well as the keyboard (press the default shortcut ALT+SHIFT+Y, then either press the assigned key or hit TAB and look up the clipping by name). In all cases, I was able to successfully insert the clipping.

One more thing I would suggest for further troubleshooting is to create a brand new Twitter account and see if you get the same error when attempting to paste a clipping into the tweet composer when logged in to that new account.

@kstev99
Copy link
Author

kstev99 commented Apr 12, 2024

That worked ! I have more than one twitter account and the other 2 accounts are not affected.

A couple of weeks ago (about when this problem started) Twitter issued a free upgrade from Basic to Elevated, or whatever it's called, to users with over 5000 followers. My main twitter account was the only one qualified for upgrade and the only one with the problem.

I can't test this because I only have ONE account that was bumped up. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants