You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using Rails 3.2.12 with your Gem to create a big docx file containing the site's users with their details.
It works great with a few users, but when there are more than a few I'm getting the following error:
xsltApplyXSLTTemplate: A potential infinite template recursion was detected.
You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000).
I'm not familiar with xslt, I didn't find where I should add the maxdepth parameter-
Any ideas?
Thank you.
Full error, and what I'm trying to do below:
RuntimeError: runtime error: file C:/row/Ruby21/lib/ruby/gems/2.1.0/gems/htmltoword-0.5.1/lib/htmltoword/xslt/inline_elements.xslt line 7 element copy
xsltApplyXSLTTemplate: A potential infinite template recursion was detected.
You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000).
Templates:
#0 name node()|@*
#1 name node()|@*
#2 name node()|@*
#3 name node()|@*
#4 name node()|@*
#5 name node()|@*
#6 name node()|@*
#7 name node()|@*
#8 name node()|@*
#9 name node()|@*
#10 name node()|@*
#11 name node()|@*
#12 name node()|@*
#13 name node()|@*
#14 name node()|@*
Variables:
from C:/row/Ruby21/lib/ruby/gems/2.1.0/gems/htmltoword-0.5.1/lib/htmltoword/document.rb:88:in `transform'
More details:
I'm trying to send a mail with the docx file as attachment (It does work, but not with many users):
class MyMailer < ActionMailer::Base
default from: "noreply@mail.net"
default to: "mail@gmail.com"
def send_word_files(users)
body = ''
users.each do |user|
user.fields.each do |field|
body << "<h2>#{field.label_name}:</h2>"
body << "</p>#{user.field_value(field)}</p>"
end
body << '<div class="-page-break"></div>'
end
attachments["users.docx"] = Htmltoword::Document.create("<html><head></head><body>#{body}</body></html>")
mail(subject: "word file", body: 'enjoy')
end
end
The text was updated successfully, but these errors were encountered:
Hi, I'm using
Rails 3.2.12
with your Gem to create a bigdocx
file containing the site's users with their details.It works great with a few users, but when there are more than a few I'm getting the following error:
I'm not familiar with
xslt
, I didn't find where I should add themaxdepth
parameter-Any ideas?
Thank you.
Full error, and what I'm trying to do below:
More details:
I'm trying to send a mail with the docx file as attachment (It does work, but not with many users):
The text was updated successfully, but these errors were encountered: