Bug #11234
closedSocial Paper edit mode cannot be triggered properly
0%
Description
It could be that I'm doing something wrong, but it appears that Social Paper editing is broken. When entering Edit mode, either during new Paper creation or the editing of an existing Paper, no edit UI shows up on the screen except for the URL editor. A couple of JS notices show up in the console; see attached screenshot. The nature of the errors make me think that TinyMCE is not loading properly. Maybe it's linked to Gutenberg?
I've spent 30 minutes trying to piece the story together but I'm not getting anywhere. Ray, I'm hopeful that perhaps you remember better than I do how FEE + Social Paper + TinyMCE are meant to initialize, and can do some debugging.
Files
Updated by Raymond Hoh over 5 years ago
I'm looking into this. You're right that it looks like a TinyMCE loading error. Probably due to an update to a later version of TinyMCE.
Updated by Raymond Hoh over 5 years ago
So it looks like Social Paper's editing mode broke since WordPress 4.9.6 when WP upgraded TinyMCE from v4.6.7 to v4.7.11:
https://core.trac.wordpress.org/ticket/43862
What I've done is rollback TinyMCE's assets for FEE here: https://github.com/cuny-academic-commons/cac/commit/3ae1964f5820e313429df73ce2d71f1584cdb76e
This fixes the immediate issue of editing in Social Paper. However, I haven't figured out why the wplink
TinyMCE plugin refuses to work:
Boone, if you have a few minutes to look it over, I'd appreciate it. Otherwise, a workaround is to remove the add the plain wplink
buttonlink
button to the FEE toolbar.
Updated by Raymond Hoh over 5 years ago
- File fee-link.gif fee-link.gif added
Okay, a decent workaround is to use TinyMCE's built-in link
plugin instead of the wplink
plugin.
I've made this change here: https://github.com/cuny-academic-commons/cac/commit/65810c2c8fdb63602c2facd95488cf520c4051b4
This is what it looks like:
I think this is good enough to resolve the problem. Boone, can you give it a test locally and let me know what you think?
Updated by Boone Gorges over 5 years ago
Looks good locally, and I agree that the wplink swapout is totally fine. Thank you for investigating! I'm going to roll this out as a hotfix.
Updated by Boone Gorges over 5 years ago
- Status changed from In Progress to Resolved