This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Element doesn't pop up for unknown reason

StudyPortals wrote on 2013-08-28:
Hi,

I have succesfully set up a system using your REST API, and everything seems to function, appart from one thing. When I print a page an entire table get's discarted.

If you compair the page I send to your API (found here) and the PDF that gets back (attached) you'll see that the entire table that says 'Totals' (between 'Accumulated Value Delivered over the campaign' and 'Conversion of interested students') is missing in the PDF.

I used the following settings:
'height' => '297mm', // A4 height
'width' => '210mm', // A4 width
'margin_top' => '15mm',
'pdf_scaling_factor' => 1

I checked the page for things that might possibly hide the table, but have found nothing so far. What am I doing wrong?
support wrote on 2013-08-30:
Hello,

We are looking into this and will keep you posted once we know what is causing this.
support wrote on 2013-08-31:
Hello,

I was investigating the problem but was unable to figure out what is the cause. It would help if you could reduce the document so that it contains only the table and send me the link. Thank you.
StudyPortals wrote on 2013-09-02:
I can take out a lot, but the first graph is hard to take out because it's linked to the table. The new page can be found here
support wrote on 2013-09-05:
Hello,

Thank you. This looks like a bug (missing functionality) in our software. Unfortunately, at this moment I'm not able to provide ETA for when this issue will be resolved.
StudyPortals wrote on 2013-09-05:
Hey,

What triggers it to not get printed? Is there a way to work around this for now?
Since the table is a very important piece of data within the page I can't have it missing for a conciderable amount of time.

Cheers
support wrote on 2013-09-05:
Hello,

The reason is in incorrect handling of Javascript code that generates the table. Unfortunately, I'm not able to provide you with any workaround at this time.
StudyPortals wrote on 2013-09-05:
Hey,

Okay, I know you have already told me you don't have an ETA yet, but do you have an indication on this? Is it a matter of days, weeks, months?
I really need this to work so I can't just accept that it's not working and will have to figure out somehow how to make this happen.

Cheers
support wrote on 2013-09-06:
Hello,

I'm really not able to provide an ETA at this moment, but it is not a matter of days or weeks but rather months.
StudyPortals wrote on 2013-09-06:
Could you at least give me more details what parts in JavaScript cause this issue so I can at least modify my code so it does get rendered?

As I stated before I really need this table to pop up and saying "something goes wrong and it's going to take us months to fix it" is simply not a satisfactory answer.

Please help me out here.

Cheers
support wrote on 2013-09-06:
Hello,

While digging into this, I noticed that both Google Chrome and Firefox report this error for this page:
Uncaught ReferenceError: Annotations is not defined reportsGeneral.js:1
Class.build reportsGeneral.js:1
i.extend.$owner mootools-1.4.1-core.js:1
overviewData.initialize reportsOverview.js:91
(anonymous function) reportsOverview.js:1160
(anonymous function) mootools-1.4.1-core.js:1
(anonymous function) mootools-1.4.1-core.js:1
Array.implement.each mootools-1.4.1-core.js:1
invoke.fireEvent mootools-1.4.1-core.js:1
g mootools-1.4.1-core.js:1


Are you able to fix this error to be sure that this does not affect the PDF generation ?
StudyPortals wrote on 2013-09-06:
This was because a module was missing on the page, and thusly, the JS of that module. I added the module and this error should no longer appear
support wrote on 2013-09-06:
I'm still getting the error, could you please double check that this is indeed fixed?
StudyPortals wrote on 2013-09-09:
I confirmed the error is gone. You might have seen this error because the old page structure was still saved in your session.
support wrote on 2013-09-09:
Hello,

One more thing, there is a syntax error on line 1125 in
/Packages/UniversityAdmin/Modules/uaStatsReporting/JS/reportsOverview.js


There is a missing space between the property id and its value:
class:'SliderButtons'

should read
class: 'SliderButtons'


Please let me know once it is fixed.
StudyPortals wrote on 2013-09-09:
I solved the syntax error.
support wrote on 2013-09-09:
I got it. It turned out that you use class as a property id. class is a future reserved word. There are two occurrences in reportsOverview.js on lines 1125 and 1133. Just change it from
class: 'some value'

to
'class': 'some value'

and the table will show up (I tested it in my local environment).
StudyPortals wrote on 2013-09-09:
This has seemed to solve the issue!

Thank you for helping me find the solution :)

Cheers