Comments (17)
So the problem is that the spellchecker plugin's javascript has some (UTF-16?) characters that don't seem to play nice when processed by Sprockets. The quick solution is to make sure that config.serve_static_assets
is disabled.
I can preprocess the javascript files distributed by TinyMCE but I'm not sure if that will have any undesired effects. Another possible option is to mount the assets in a different manner for development mode (currently I'm just adding the TinyMCE files to the Sprockets load paths).
Is it possible to set config.serve_static_assets = false
in your situation?
from tinymce-rails.
Still getting tons of errors.
Feature: Payment object comments
In order to explain a action I performed on a payment object
As a user
I want to make a comment
@wip @javascript
Scenario: Creating a comment # features/payment_objects/comments.feature:8
[paperclip] Saving attachments.
[paperclip] Saving attachments.
[paperclip] Saving attachments.
Given I am in a company # features/step_definitions/application_steps.rb:1
And I have created 1 cash requisition # features/step_definitions/payment_steps.rb:5
When I am on the requisitions page # features/step_definitions/web_steps.rb:44
And I click on the 1st requisition # features/step_definitions/payment_steps.rb:39
When I open the Comments tab # features/step_definitions/payment_steps.rb:101
http://127.0.0.1:55108/assets/tinymce/themes/advanced/editor_template.js?3.4.5:1 SyntaxError: Parse error
When I fill in "comment_content" with "Testing123" # features/step_definitions/web_steps.rb:64
http://127.0.0.1:55108/assets/tinymce/plugins/fullscreen/editor_plugin.js?3.4.5:1 SyntaxError: Parse error
And I click on "Comment" # features/step_definitions/web_steps.rb:52
http://127.0.0.1:55108/assets/tinymce/langs/en.js?3.4.5:1 SyntaxError: Parse error
Then there should be a comment saying "Testing123" # features/step_definitions/payment_steps.rb:106
http://127.0.0.1:55108/assets/tinymce/themes/advanced/editor_template.js?3.4.5:1 SyntaxError: Parse error
NoMethodError: undefined method `nfields' for nil:NilClass: SELECT tablename
FROM pg_tables
WHERE schemaname = ANY (current_schemas(false))
(ActiveRecord::StatementInvalid)
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/whiny_nil.rb:48:in `method_missing'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:490:in `result_as_array'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:533:in `block in query'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:244:in `block in log'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:239:in `log'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:532:in `query'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:666:in `tables'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/truncation.rb:123:in `tables_to_truncate'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/truncation.rb:114:in `block in each_table'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:457:in `disable_referential_integrity'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/truncation.rb:113:in `each_table'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/deletion.rb:56:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/base.rb:77:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `block in clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `each'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `clean'
/Users/pma/Sites/app/features/support/env.rb:37:in `After'
http://127.0.0.1:55108/assets/tinymce/plugins/spellchecker/editor_plugin.js?3.4.5:1 SyntaxError: Parse error
from tinymce-rails.
Bare minimum repo https://github.com/PatrickMa/tiny_mce_rails_problems
bundle && cucumber
from tinymce-rails.
Can you try the latest version from git? I've added a release step to (hopefully) fix the encoding issues in the spellchecker plugin.
from tinymce-rails.
This week on batman:
So I'm using your git repository like this in my Gemfile:
gem 'tinymce-rails', :git => 'git://github.com/spohlenz/tinymce-rails.git'
But I'm still getting random fails, what makes this problem really frustrating is that it sometimes PASSES!
And it sometimes fails!
So I would run cucumber and everything seems okay one time, I'd push deploy, run cucumber again later that day to find it's broken! But none of my app code changed.
Feature: Payment object comments
In order to explain a action I performed on a payment object
As a user
I want to make a comment
@wip @javascript
Scenario: Creating a comment # features/payment_objects/comments.feature:8
[paperclip] Saving attachments.
[paperclip] Saving attachments.
[paperclip] Saving attachments.
Given I am in a company # features/step_definitions/application_steps.rb:1
And I have created 1 cash requisitions # features/step_definitions/payment_steps.rb:5
When I am on the requisitions page # features/step_definitions/web_steps.rb:44
And I click on the 1st requisition # features/step_definitions/payment_steps.rb:39
When I open the Comments tab # features/step_definitions/payment_steps.rb:101
http://127.0.0.1:59193/assets/tinymce/plugins/fullscreen/editor_plugin.js?3.4.5:1 SyntaxError: Parse error
http://127.0.0.1:59193/assets/tinymce/plugins/spellchecker/editor_plugin.js?3.4.5:1 SyntaxError: Parse error
When I fill in "comment_content" with "Testing123" # features/step_definitions/web_steps.rb:64http://127.0.0.1:59193/assets/tinymce/themes/advanced/editor_template.js?3.4.5:1 SyntaxError: Parse error
http://127.0.0.1:59193/assets/tinymce/langs/en.js?3.4.5:1 SyntaxError: Parse error
http://127.0.0.1:59193/assets/application.js:9506 TypeError: Result of expression 'q' [undefined] is not a constructor.
And I click on "Comment" # features/step_definitions/web_steps.rb:52
Then there should be a comment saying "Testing123" # features/step_definitions/payment_steps.rb:106
PGError: ERROR: relation "329" does not exist
: ALTER TABLE "329" DISABLE TRIGGER ALL (ActiveRecord::StatementInvalid)
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:541:in `async_exec'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:541:in `block in execute'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:244:in `block in log'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:239:in `log'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:540:in `execute'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:455:in `disable_referential_integrity'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/truncation.rb:113:in `each_table'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/deletion.rb:56:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/base.rb:77:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `block in clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `each'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `clean'
/Users/pma/Sites/boss/features/support/env.rb:37:in `After'
http://127.0.0.1:59193/assets/tinymce/plugins/spellchecker/editor_plugin.js?3.4.5:1 SyntaxError: Parse error
from tinymce-rails.
Also, your git repository update did this:
[master][~/Sites/boss] git diff --color
diff --git a/Gemfile.lock b/Gemfile.lock
index 6868cbb..91f275d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,4 +1,12 @@
GIT
+ remote: git://github.com/spohlenz/tinymce-rails.git
+ revision: e82ca9187b26322daf5e7fc9cda64ef258480d47
+ specs:
+ tinymce-rails (3.4.5)
+ digestion (~> 1.0)
+ railties (~> 3.1.0)
+
+GIT
remote: [email protected]:PatrickMa/acts_as_audited.git
revision: 409a8ac81e12c602e75f84bc0dd3f953a48c9bdf
specs:
@@ -274,9 +282,6 @@ GEM
libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.3)
- tinymce-rails (3.4.5)
- digestion (~> 1.0)
- railties (~> 3.1.0)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
@@ -332,7 +337,7 @@ DEPENDENCIES
spork
squeel
therubyracer
- tinymce-rails
+ tinymce-rails!
turn
uglifier
warden
Which caused this:
Served asset /tinymce/plugins/spellchecker/editor_plugin.js - 404 Not Found (126ms)
from tinymce-rails.
Is your app working okay in development or production mode?
It's taking me a while to get capybara-webkit
set up but I'm still looking into your test app.
from tinymce-rails.
Also getting these errors which prevents tinymce from even loading in development.
Started GET "/assets/tinymce/plugins/fullscreen/editor_plugin.js?3.4.5" for 127.0.0.1 at 2011-09-09 16:55:50 +0800
Served asset /tinymce/plugins/fullscreen/editor_plugin.js - 404 Not Found (4ms)
ActionController::RoutingError (No route matches [GET] "/assets/tinymce/plugins/fullscreen/editor_plugin.js"):
Rendered /Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.6ms)
Started GET "/assets/tinymce/langs/en.js?3.4.5" for 127.0.0.1 at 2011-09-09 16:55:50 +0800
Served asset /tinymce/langs/en.js - 404 Not Found (7ms)
ActionController::RoutingError (No route matches [GET] "/assets/tinymce/langs/en.js"):
Rendered /Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms)
Started GET "/assets/tinymce/themes/advanced/editor_template.js?3.4.5" for 127.0.0.1 at 2011-09-09 16:55:50 +0800
Served asset /tinymce/themes/advanced/editor_template.js - 404 Not Found (4ms)
ActionController::RoutingError (No route matches [GET] "/assets/tinymce/themes/advanced/editor_template.js"):
Rendered /Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.7ms)
Started GET "/assets/tinymce/plugins/spellchecker/editor_plugin.js?3.4.5" for 127.0.0.1 at 2011-09-09 16:55:50 +0800
Served asset /tinymce/plugins/spellchecker/editor_plugin.js - 404 Not Found (10ms)
ActionController::RoutingError (No route matches [GET] "/assets/tinymce/plugins/spellchecker/editor_plugin.js"):
Rendered /Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms)
from tinymce-rails.
Unfortunately I'm not seeing any of those issues in your test app. As far as the TinyMCE plugin is concerned, it works fine for me.
The cucumber feature doesn't actually pass (there should be a post with content "hello world"
fails), but I believe that's due to the way TinyMCE creates an iframe for its content (and your feature is filling in the textarea). I'm not sure how to fix that though.
from tinymce-rails.
Yeah I was getting those errors in my actual app, it seems something happened. It works in production, not in development.
So I tried cloning my app again from when it was last working, but no hurrah.
from tinymce-rails.
It's weird, isn't it? I get this error sometimes when running locally, sometimes when deploying to production (Heroku Cedar with asset compilation during slug compilation). I can't figure out why it sometimes works and sometimes fails.
from tinymce-rails.
I encountered the same problem, and i have to set config.serve_static_assets = true
, but after using the master branch, the problem is solved. Thanks spohlenz !
from tinymce-rails.
I believe I am having a similar issue with encoding. Everything works fine in development, even if i turn on sprocket compilation and precompile. But deploying to production I get something like this "rake aborted!
387: unexpected token at '", screenfulls of tinyMCE code, and then "(in /data/afar/shared/bundled_gems/ruby/1.9.1/gems/tinymce-rails-3.4.5/assets/precompiled/tinymce/tiny_mce_jquery_src.js)
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
rake aborted!
"
and then it seems to happen again.
from tinymce-rails.
@PatrickMA, @jgarber, @jasonmarkperez can you try with different ruby versions and/or fresh gemsets? Make sure you're using the latest tinymce-rails from git though.
I'd really like to track down the source of these issues. Any insight you can gain from doing the above would be much appreciated.
from tinymce-rails.
I experienced the problem intermittently before. Since updating to the
latest tinymce-rails, I have not experienced it. At least for me, I think
you fixed it! Great job!
Jason
On Sat, Sep 17, 2011 at 4:05 AM, Sam Pohlenz <
[email protected]>wrote:
@PatrickMA, @jgarber, @jasonmarkperez can you try with different ruby
versions and/or fresh gemsets? Make sure you're using the latest
tinymce-rails from git though.I'd really like to track down the source of these issues. Any insight you
can gain from doing the above would be much appreciated.Reply to this email directly or view it on GitHub:
#10 (comment)
from tinymce-rails.
I just encountered the same issue. Using tinymce-rails from master works. So e82ca91 seems to have fixed the issue. Would be great if you'd release a new gem soon :-)
from tinymce-rails.
Had the same issue, rails 3.2.8, Ruby-1.9.3
Got around, deleting the culprit characters in spellcheck plugin
from tinymce-rails.
Related Issues (20)
- How to show formatted content?
- Missing 5.10.5 update HOT 1
- valid_styles compiles incorrectly for v6 HOT 2
- Couldn't find file 'tinymce-jquery' HOT 2
- Configuring init_instance_callback does not work with string or arrow function HOT 3
- Doesn't work with multiple visits HOT 5
- tinymce fonts are not loading correctly HOT 4
- TinyMCE is stripping HTML code for YouTube iFrame embed, therefore the embed is not displaying HOT 2
- Getting Rails 7 Stimulus controllers to work with Tinymce
- Upgraded tinymce-rails from 5.2 to 6.4.2 and default silver theme is not working HOT 3
- How to use it with paid plugins HOT 2
- Does not work with Propshaft / cssbundling-rails,? HOT 3
- Problem with deploy on production HOT 6
- Can't init editor manually HOT 1
- Rails 7 with Importmaps - TinyMCERails is not defined HOT 4
- Question: How to pass api_key with this gem? HOT 1
- Turbo + TinyMCE — doesn't reinit the editor after a Turbo interaction HOT 2
- Update to TinyMCE 7.0.0
- Wrong license on main branch (since version 7) HOT 1
- Missing release/tag - 4.9.11.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinymce-rails.