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
In my docx files it seems as a result of the AUTOTEXT fields there will be a <w:fldChar w:fldCharType="begin"/> tag but no <w:fldChar w:fldCharType="end"/>
This causes a nil value to be passed into the ComplexField.new method and then blow up in initialize because n.search is being called when n == nil.
It is possible that my docx files are somehow syntactically invalid but they have no display issues, opening and re-saving them has no effect, nor does a C/P of the contents into a fresh document. I have a fix here if this is actually a bug and not some special case I happen to be running into.
The text was updated successfully, but these errors were encountered:
Interesting... I have not come across such a template. We did insert all MergeFields ourselves so maybe this is something that was produced by an older version of Word. If Word recognizes the field and functionality is not restricted, I think it would be nice to support that case.
Would you mind opening a PR with the fix and also a test-case that contains a WordML sample? Ideally the sample would be extracted from your document so that we have something as close to a real thing as possible.
In my docx files it seems as a result of the AUTOTEXT fields there will be a
<w:fldChar w:fldCharType="begin"/>
tag but no<w:fldChar w:fldCharType="end"/>
This causes a
nil
value to be passed into the ComplexField.new method and then blow up ininitialize
becausen.search
is being called whenn == nil
.It is possible that my docx files are somehow syntactically invalid but they have no display issues, opening and re-saving them has no effect, nor does a C/P of the contents into a fresh document. I have a fix here if this is actually a bug and not some special case I happen to be running into.
The text was updated successfully, but these errors were encountered: