Failure to contact data

Error message

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'comment_node_forum_form' not found or invalid function name in drupal_retrieve_form() (line 844 of /var/www/

Hi there,

I have been attempting to customize report generating, but to no avail. First I will describe my goal, then I will talk about the issues.

I am trying to get a report with one table that has all of the vulnerabilities of a system, including a summary, affected systems, references, description, recommendation, and severity level. It would be better if the entries were in ascending order where the highest severity levels are the top rows of the table.

I am working on this report template in Word 2010 and my Xpath functions don't seem to grab the data from within MagicTree that I have imported.

Regardless of what I put inside {{}} that deals with my testdata, it doesn't seem to work. However, if I place {{3 * 5}} for example then Xpath executes this code and outputs the answer correctly. When I attempt something as simple as {{//host}} or {{//findings}}, I only see my Xpath code when I generate a report off my data and not the actual hosts or findings. There are even cases where it would work upon one report generation and then as soon as I make one small change, it doesn't work anymore.

According to the documentation, the first column of a row is defined to be the highest level of scope and the following columns in the row follow from that. It's also important note that I get the following error if I attempt to make a call to scopes within the table:

Report generation failed. Failed evaluating XPath expression "//finding[@title = $_0 and @status!='ignore']": Cannot resolve variable "$_0": Back-reference stack contains 0 values. (namespaceURI: null, prefix=, localName=_0)

Any help would be appreciated!

> When I attempt something as simple as {{//host}} or {{//findings}}, I only see my Xpath code when I generate a report off my data and not the actual hosts or findings.

This usually happens if your expression gets broken up in Word XML markup. To fix it first turn of the spell checker, so that there are no red wavy line anywhere in the template. Secondly, select your expression, cut it out with Ctrl+X, and then paste it back using "Paste special" -> Plain Text. Paste special is in the Paste menu. This will make sure that your expression is not broken up.

I know it is quite a pain, so we are looking for a way to make this happen automatically and transparently to the user (i.e. if the report generator finds an incomplete XPath expression, it looks for its tail and glues it together)

The error you are getting is probably related to the first problem. The report generator does not find the data $_ 0 refers to.

It works! I am very pleased to see it working after countless hours. What a strange error too -- I bet only Microsoft's Word causes the problem unlike Open Office.

Good to hear there might be a way to fix this in the future!

Regarding XPath, do you know which version MagicTree uses? 1.0 or 2.0? This will be helpful to start using more XPath functions such as if and else statements; this would further empower the reporting abilities.

Thank you!

MagicTree uses XPath 1.0. There is also several custom functions - see . The build-in help in MagicTree has a more up-to-date list of custom functions, for example mt:sort()

Im doing my template and im having the same bug, the cut&paste works also.

PD: Awesome solution

Add new comment

Please answer the question to prove that you are not a spammer. If it isn't working and you are not a spammer, please email us.
Fill in the blank.