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

Uncaught TypeError: Cannot read properties of undefined (reading 'dom') #10

Open
rpatil opened this issue Dec 10, 2021 · 2 comments
Open

Comments

@rpatil
Copy link

rpatil commented Dec 10, 2021

After clicking on the source-code button of the editor, the complete text vanishes.

Gem details:

gem 'trestle', '0.9.2'
gem 'trestle-auth', '0.3.0'
gem 'trestle-search', '0.4.1'
gem 'trestle-tinymce', '0.3.1'
gem 'tinymce-rails', '5.10.1'

Step 1:

Screenshot 2021-12-10 at 6 41 34 PM

Step 2:

Screenshot 2021-12-10 at 6 39 17 PM

@dongalor
Copy link

dongalor commented Mar 27, 2022

I'm having same problem, but only in production. Running it locally in development environment works like a charm. So, it looks like after precompiling assets something goes wrong.

@denisse-orellana
Copy link

For those who have this problem in production, I recommend you to change in production.rb:

config.assets.js_compressor = :uglifier

To:

config.assets.js_compressor = Uglifier.new(harmony: true)

Also, delete cache and everything. Try it in different browsers.
(You can use the gem Terser too as a JavaScript compressor).

I hope this can be helpful, I've spent days trying to understand the problem.

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

No branches or pull requests

3 participants