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 ReferenceError: jsToolBar is not defined #19

Open
xoox opened this issue Oct 9, 2020 · 0 comments
Open

Uncaught ReferenceError: jsToolBar is not defined #19

xoox opened this issue Oct 9, 2020 · 0 comments

Comments

@xoox
Copy link

xoox commented Oct 9, 2020

Hi, Thanks for this wonderful plugin. While using {{comment_form}} and {{comments}} macros, the following error was encountered.

System info : Linux 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux
Environment:
  Redmine version                4.1.1.stable
  Ruby version                   2.6.6-p146 (2020-03-31) [x86_64-linux]
  Rails version                  5.2.4.2
  Environment                    production
...
Redmine plugins:
  redmine_wiki_extensions        0.9.2

How to re-produce

  • Install a fresh redmine system and add redmine_wiki_extensions as the only plugin.
  • Change Administration -> Settings -> General -> Text formatting to "Markdown" (optional, Textile will show the same error.)
  • Add a test project "testPro" with "Wiki extensions" module enabled.
  • Go to "Wiki" section of the new created project and edit the start wiki page. Add the following text and save.
# Wiki

some text.

{{comment_form}}
  • Open the developer tools of your browser. (For Edge/Chrome/Firefox, Press F12 on Windows)
  • In the Console panel you will see error message of "Uncaught ReferenceError: jsToolBar is not defined"

Why it occurred

While viewing wiki pages, jstoolbar related Javascripts are not loaded by default, which are needed by {{comment_form}}.

Possible solutions

Add jstoolbar Javascripts in html header of wiki views. There're helper functions in Redmine which might be helpful. Click the following link for details. https://github.com/redmine/redmine/blob/master/lib/redmine/wiki_formatting/markdown/helper.rb

And would you please add/improve support for Markdown formatting?

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

1 participant