Project

General

Profile

Actions

Bug #11234

closed

Social Paper edit mode cannot be triggered properly

Added by Boone Gorges over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority name:
High
Assignee:
Category name:
Social Paper
Target version:
Start date:
2019-03-18
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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

fee.gif (70.6 KB) fee.gif Raymond Hoh, 2019-03-18 07:10 PM
fee-link.gif (138 KB) fee-link.gif Raymond Hoh, 2019-03-18 07:33 PM
Actions #1

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.

Actions #2

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 wplink button add the plain link button to the FEE toolbar.

Actions #3

Updated by Raymond Hoh over 5 years ago

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?

Actions #4

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.

Actions #5

Updated by Boone Gorges over 5 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF