modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

Changing resource type to RSS breaks RTE #13718

Closed bschwenk closed 6 years ago

bschwenk commented 6 years ago

Summary

Changing the resource type to RSS in the "Settings" tab blocks editing in the RTE.

Step to reproduce

  1. Create a new resource (leave type set to HTML)
  2. Add any content in RTE and save
  3. Edit resource again then go to Settings -> Resource Type, select "RSS"
  4. Save resource, manually refresh browser

Observed behavior

RTE now shows no syntax highlighting, and it's not possible to edit any text in the RTE until you change the resource type again then manually refresh.

Browser console shows JS error:

GET https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.4/mode-undefined.js net::ERR_ABORTED

Network tab also shows error 400 on this resource. image

Environment

MODX Revolution 2.5.7-pl (traditional) nginx (hosted MODX cloud)

donShakespeare commented 6 years ago

Which RTE (Rich Text Editor) do you have installed and running? Which Code Editor do you have installed and running?

OptimusCrime commented 6 years ago

This looks related to a MODX extra, not the MODX core?

bschwenk commented 6 years ago

It's TinyMCE. I thought TinyMCE was included with a vanilla install. Screenshot attached for reference. If that's not the case, please close the issue and my apologies for the inconvenience.

image

OptimusCrime commented 6 years ago

TinyMCE is a third party extra. It is not a part of the manager core. Additionally, the attached picture does not look like TinyMCE to me, it looks like CodeMirror or something?

I'm closing this issue, but feel free to respond and we will try to find the correct place to file this issue.

@modxbot close

Jako commented 6 years ago

It should be an ACE issue and you could open an issue there. Maybe it is still maintained.

ACE only works on the content field, when no RTE is active. And for some reason ACE tries to detect the content type, switches to mode-undefined, tries to load the according script and fails because it is not found.