Closed siamak-haschemi closed 1 year ago
The usage of the ActionController::Base.relative_url_root
on the 5th line is very likely to be an error - I just didn't know what was the best way to generate non-standard URL that was required to reference the video and it's quite possible this code just does not work if relative_url_root is not set.
As a quick fix you can try to remove ActionController::Base.relative_url_root +
altogether and leave only right part of the expression - that should work if your Redmine installation is not in the subfolder.
Unfortunately right now I do not have enough time to implement / test the proper solution, therefore I will leave this issue open and will try to come back to it once I perform one more round of changes in the plugin ...
I Installed ffmeg, librmagick, and wget through apt-get. I pulled the last git revision.
I attached a video (http://www.cna.org/isaac/einstein_fluid.avi) to a wiki site, and added {{video(einstein_fluid.avi)}} . I got following error:
Error executing the video macro ( ActionView::TemplateError (undefined method
+' for nil:NilClass) on line #5 of vendor/plugins/wiki_external_filter/app/views/wiki_external_filter/macro_flash-video.html.erb: 2: require 'RMagick' 3: image = Magick::Image::from_blob(content[0]).first 4: %> 5: ' href='<%= ActionController::Base.relative_url_root + "/wiki_external_filter/#{macro}.flv?name=#{name}" %>' title='<%= h source %>' style='display:block;width:<%= image.columns %>px;height:<%= image.rows + 24 %>px;background-image:url(<%= url_for(:controller => 'wiki_external_filter', :action => 'filter', :macro => macro, :name => name, :index => 0) %>);background-repeat:no-repeat'><%= image_tag 'play_large.png', :plugin => 'wiki_external_filter', :style => "display:block;position:relative;left:#{image.columns / 2 - 83 / 2}px;top:#{image.rows / 2 - 83 / 2}px" %> 6: <% 7: content_for :header_tags do 8: if not @flowplayer_scripts_included vendor/plugins/wiki_external_filter/app/views/wiki_external_filter/macro_flash-video.html.erb:5 vendor/plugins/wiki_external_filter/app/helpers/wiki_external_filter_helper.rb:151:in
render_common' vendor/plugins/wiki_external_filter/app/helpers/wiki_external_filter_helper.rb:135:inrender_tag' vendor/plugins/wiki_external_filter/app/helpers/wiki_external_filter_helper.rb:166:in
render' vendor/plugins/wiki_external_filter/init.rb:23:inmacro_video' lib/redmine/wiki_formatting/macros.rb:24:in
send' lib/redmine/wiki_formatting/macros.rb:24:inexec_macro' app/helpers/application_helper.rb:456 lib/redmine/wiki_formatting.rb:124:in
call' lib/redmine/wiki_formatting.rb:124:inexecute_macros' lib/redmine/wiki_formatting.rb:116:in
gsub!' lib/redmine/wiki_formatting.rb:116:inexecute_macros' lib/redmine/wiki_formatting.rb:62:in
to_html' app/helpers/application_helper.rb:456:intextilizable' app/views/wiki/_content.rhtml:2:in
_run_rhtml_app47views47wiki47_content46rhtml_locals_content_object' app/views/wiki/show.rhtml:30:in_run_rhtml_app47views47wiki47show46rhtml' app/controllers/wiki_controller.rb:61:in
index' )Thanks in advance!
Cheers, Siamak