We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On some pages I have an 'Internal Error' and in the logfile I see:
NoMethodError (undefined method match' for nil:NilClass): plugins/redmine_doc_pu/lib/latex_wiki_page.rb:10:in block in to_latex' plugins/redmine_doc_pu/lib/latex_wiki_page.rb:9:in to_latex' plugins/redmine_doc_pu/app/models/doc_pu_wiki_page.rb:24:in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:67:in block in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:66:in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:120:in build' plugins/redmine_doc_pu/app/models/doc_pu_document.rb:27:in build' plugins/redmine_doc_pu/app/controllers/doc_pu_controller.rb:101:in build_remote' lib/redmine/sudo_mode.rb:63:in sudo_mode'
match' for nil:NilClass): plugins/redmine_doc_pu/lib/latex_wiki_page.rb:10:in
to_latex' plugins/redmine_doc_pu/app/models/doc_pu_wiki_page.rb:24:in
block in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:66:in
build' plugins/redmine_doc_pu/app/models/doc_pu_document.rb:27:in
build_remote' lib/redmine/sudo_mode.rb:63:in
Environment: Redmine version 3.2.8.stable Ruby version 2.2.9-p480 (2017-12-15) [x86_64-linux] Rails version 4.2.7.1 Environment production Database adapter Mysql2 SCM: Subversion 1.8.8 Git 1.9.1 Filesystem Redmine plugins: redmine_backlogs v1.0.6 redmine_base_deface 0.0.1 redmine_doc_pu 2.1.0 redmine_maintenance_mode 2.1.0
Any Ideas?
The text was updated successfully, but these errors were encountered:
Here is a diff which fixed it for me
--- a/lib/latex_wiki_page.rb +++ b/lib/latex_wiki_page.rb @@ -7,8 +7,10 @@ module ModuleLatexWikiPage # Collect all attached images and get disk filename file_sub = {} self.wiki_page.attachments.each do |att| - unless att.content_type.match(/^image/i).nil? - file_sub[att.filename] = att.diskfile + if att.content_type + unless att.content_type.match(/^image/i).nil? + file_sub[att.filename] = att.diskfile + end end end
--- a/lib/latex_wiki_page.rb
+++ b/lib/latex_wiki_page.rb
@@ -7,8 +7,10 @@ module ModuleLatexWikiPage
# Collect all attached images and get disk filename
file_sub = {}
self.wiki_page.attachments.each do |att|
- unless att.content_type.match(/^image/i).nil?
- file_sub[att.filename] = att.diskfile
+ if att.content_type
+ unless att.content_type.match(/^image/i).nil?
+ file_sub[att.filename] = att.diskfile
+ end
end
btw. how to paste Diff in markdown?
Sorry, something went wrong.
No branches or pull requests
On some pages I have an 'Internal Error' and in the logfile I see:
NoMethodError (undefined method
match' for nil:NilClass): plugins/redmine_doc_pu/lib/latex_wiki_page.rb:10:in
block in to_latex'plugins/redmine_doc_pu/lib/latex_wiki_page.rb:9:in
to_latex' plugins/redmine_doc_pu/app/models/doc_pu_wiki_page.rb:24:in
to_latex'plugins/redmine_doc_pu/lib/latex_doc.rb:67:in
block in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:66:in
to_latex'plugins/redmine_doc_pu/lib/latex_doc.rb:120:in
build' plugins/redmine_doc_pu/app/models/doc_pu_document.rb:27:in
build'plugins/redmine_doc_pu/app/controllers/doc_pu_controller.rb:101:in
build_remote' lib/redmine/sudo_mode.rb:63:in
sudo_mode'Environment:
Redmine version 3.2.8.stable
Ruby version 2.2.9-p480 (2017-12-15) [x86_64-linux]
Rails version 4.2.7.1
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Git 1.9.1
Filesystem
Redmine plugins:
redmine_backlogs v1.0.6
redmine_base_deface 0.0.1
redmine_doc_pu 2.1.0
redmine_maintenance_mode 2.1.0
Any Ideas?
The text was updated successfully, but these errors were encountered: