Vote #77603
完了Saving an empty Markdown image tag in Wiki pages causes internal server error
0%
説明
Steps to reproduce:
- use Markdown Wiki formatting
- Create a Wiki page
- Add an empty image tag, i.e.:
![]()
- Save the changes
- From now on, this page will show an internal server error, eventually also crashing the whole Redmine instance
The log shows the following error:
Started GET "/projects/fpga/wiki" for 127.0.0.1 at 2016-07-05 11:28:01 +0200 Processing by WikiController#show as HTML Parameters: {"project_id"=>"fpga"} Current user: viktor@foobar.com (id=17) Rendered wiki/_content.html.erb (9.7ms) Rendered wiki/show.html.erb within layouts/base (31.2ms) Completed 500 Internal Server Error in 277ms (ActiveRecord: 23.1ms) ActionView::Template::Error (undefined method `include?' for nil:NilClass): 1:2: <%= textilizable content, :text, :attachments => content.page.attachments, 3: :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> 4:lib/redmine/helpers/url.rb:26:in `uri_with_safe_scheme?' lib/redmine/wiki_formatting/markdown/formatter.rb:48:in `image' lib/redmine/wiki_formatting/markdown/formatter.rb:60:in `render' lib/redmine/wiki_formatting/markdown/formatter.rb:60:in `to_html' lib/redmine/wiki_formatting.rb:89:in `to_html' app/helpers/application_helper.rb:598:in `textilizable' app/views/wiki/_content.html.erb:2:in `_app_views_wiki__content_html_erb__2292234759012989548_70948640' app/views/wiki/show.html.erb:47:in `_app_views_wiki_show_html_erb___1795174084185801307_65213660' app/controllers/wiki_controller.rb:114:in `show' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
journals
At this point, the only way to solve this is delete this line directly from the database.
--------------------------------------------------------------------------------
Fixed in r15607, thanks for pointing this out.
--------------------------------------------------------------------------------
Wow, that was crazy fast! Applied this oneliner to our instance and I'm happy to confirm it indeed works now. Thanks a lot, Jean-Philippe.
--------------------------------------------------------------------------------
Thanks for your feedback.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
duplicates,Closed,23395,Markdown formatter crashes