Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Plugin totally messes up on new posts now. #373

Closed
metallikat36 opened this issue Oct 22, 2017 · 15 comments
Closed

Plugin totally messes up on new posts now. #373

metallikat36 opened this issue Oct 22, 2017 · 15 comments
Labels

Comments

@metallikat36
Copy link

metallikat36 commented Oct 22, 2017

See the video:
https://youtu.be/iRcyxsuRIN4
Not sure if this started with the last update or not. Weird.

The references are overwriting themselves, appearing on the uncited list, and doing other weird things. Also got an error: "Cannot read property "id" of undefined".

Reminder, you have my site login, if you want a place to reproduce.

No rush. Just happy you are always so willing to develop this plugin.

@dsifford
Copy link
Owner

Sorry to hear that!

If you are able to reliably reproduce the issue, please write down the exact steps you take to trigger the error and I'll look into it.

@metallikat36
Copy link
Author

The steps are exactly what is in the video. Just make a new page or post and try to do anything at all with the plugin. It won't work adding beyond 1 reference.

@dsifford
Copy link
Owner

dsifford commented Oct 22, 2017

I'm able to reproduce. Gonna work on simplifying how citations are checked for duplicates by using non-cryptographic hashes rather than complex logic. I think that might help.

Also working on fixing issues with IE11. Next update should be out by next weekend if time is on my side.

In the future, paste specific PMIDs that you used when reporting issues so that I can quickly reproduce the issue exactly.

Thanks

@dsifford dsifford added the bug label Oct 22, 2017
@dsifford
Copy link
Owner

@metallikat36 I think I got it sorted out. Spent most of the day working on perf improvements. Would you be interested in testing it out if I compile a copy for you prior to pushing the update?

@metallikat36
Copy link
Author

Sure, I can test it. I just deactivate and uninstall the current version, then upload the new version, right?

@dsifford
Copy link
Owner

Correct. (Keeping in mind that you'll lose any options you set in the options page if you physically uninstall the plugin... Deleting it manually won't trigger uninstall hooks).

You might need to make sure your cache is cleared since I didn't change the version number in this build.

Thanks for the help.

academic-bloggers-toolkit-prerelease.zip

@metallikat36
Copy link
Author

Okay, I will test this tomorrow.

@metallikat36
Copy link
Author

Doesn't work. The Reference list has no options when I make a new post:
image

@dsifford
Copy link
Owner

@metallikat36 That's likely cache. I didn't change the version number so you need to make sure you manually clear your server cache.

Did you do that?

@metallikat36
Copy link
Author

metallikat36 commented Oct 24, 2017

Clearing just my server cache wasn't enough. I cleared by browser cache and cookies, and disabled CloudFlare, and then the plugin options showed up as normal.

But, still buggy. The following video is a little long (4 minutes), but it gives step-by-step things you can try to reproduce, with PMID numbers. Some things worked, some things didn't. This will need another round of testing for sure.
https://youtu.be/AVj6XAV_pKo
Sorry for poor video quality. I'll fix that next time.

IDs used in this video (in order). Comments in parentheses indicate a bug. Lack of comments in parentheses indicate it worked as expected:

  • 123456
  • 1234567 (did not insert citation in right location. I think this may have something to do with needing to put a space after a citation, before trying to add an adjacent one)
  • 123456
  • 1234567 (deleted citations for 123456, hence moving 123456 to uncited list)
  • 123456
  • PMC3586309 (gives error message - the following identifiers could not be found)
  • inserted two existing citations at once, and it worked.
  • inserted one existing citation and it worked.
  • around 2:30, I try to select the block with one citation I just added, with the intention of adding a second citation to it. But there is a bug with selecting it. It deselects every time I click on a reference in the list.
  • around 3:00, I typed some text, then tried the same operation again that i tried at 2:30. This time it worked, with no deselecting bug. I was expecting this to cause yet another bug though, but it didn't. I need to reproduce that still. I did in fact see it earlier, but did not video record it.
  • 123458
  • added 123459 to the block containing 123458. It worked, which again suprised me.

@dsifford
Copy link
Owner

Thanks for the vid. Very helpful.

Most of those things are broken downstream in TinyMCE. I'll see if I can maybe improve on my end, but more than likely it'll need to be fixed by the tinymce people.

The PMC is definitely ABT domain though so I'll get that sorted out.

@metallikat36
Copy link
Author

Maybe I haven't been paying enough attention, but is the tinymce stuff you are referring to something I should expect to be fixed in a future update of wordpress or something? Or is there someone that I need to be contacting?

@dsifford
Copy link
Owner

Not worth the effort. WordPress is currently at version 4.7. When WordPress hits version 5.0 (expected early in 2018) they are switching from TinyMCE to their Gutenberg editor. And notably, when that happens, this plugin will be bricked completely until I can see if I can figure out how to make it work.

I've prepared as much as I can for the Gutenberg switch, but their API is still not stable enough to warrant working any further. It's clear though already that it'll be a much more complex endeavor because instead of one single editor to manage, each "block" that the user creates will have to be managed independently.

TL;DR: Not worth fixing the tinymce issues. Gutenburg is right around the corner.

@dsifford
Copy link
Owner

Looking at this now...

To comment directly in order of the issues you list...

  1. TinyMCE issue, confirmed.
  2. TinyMCE issue, confirmed.
  3. ABT issue. I'll fix.
  4. "Around 2:30 tried selecting a block" -- It should still work even though the block doesn't appear surrounded. (Again, TinyMCE issue)

In summary: The only fixable issue in that video is the PMC thing. All others are annoyances that we're going to have to live with for now because of the imperative nature of TinyMCE and the associated weaknesses that come with imperative programming.

@dsifford
Copy link
Owner

@metallikat36 Might be worth bringing up issue 1 with tinymce now that I look at it. That's sort of a big deal.

I'll see if I can chat with them about it when I get time. The issue is that their "selection" api is broken and doesn't produce the correct Range.

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

No branches or pull requests

2 participants