instead of having PDF generated I got this:

Asked by lioninzion on 2015-09-14

Dear friends,
instead of having PDF generated I got this:

{"html": "<div>\n <table class=\"report-dialog-message\">\n <tbody>\n <tr>\n <td>Opis<\/td>\n <td>Profil osoby, kontakty, grupy, itp.<\/td>\n <\/tr>\n <tr>\n <td>Typ pliku<\/td>\n <td>PDF<\/td>\n <\/tr>\n <\/tbody>\n <\/table>\n <form action=\"http:\/\/sp6.dozp.pl\/persons\/manager\/request_person_profile_pdf.html\"\n method=\"post\" enctype=\"multipart\/form-data\"\n class=\"standalone\" name=\"form\" id=\"form\">\n \n <div class=\"viewspace\">\n \n \n \n \n \n \n \n <div class=\"required-info\">\n <span class=\"required\">*<\/span>\n &ndash; <span>oznacza wymagane pole<\/span>\n <\/div>\n \n \n <div>\n \n <fieldset>\n \n\n <div>\n <input name=\"file_type\" type=\"hidden\" value=\"PDF\" \/>\n <input name=\"description\" type=\"hidden\"\n value=\"Profil osoby, kontakty, grupy, itp.\" \/>\n <\/div>\n\n <\/fieldset>\n \n \n \n <\/div>\n \n \n <\/div>\n \n <div>\n <div class=\"buttons\">\n \n \n<input id=\"form-buttons-download\"\n name=\"form.buttons.download\"\n class=\"submit-widget button-field button-ok\"\n value=\"Wygeneruj\" type=\"submit\"\n onclick=\"return ST.dialogs.submit(this, this);\" \/>\n\n\n \n<input id=\"form-buttons-cancel\" name=\"form.buttons.cancel\"\n class=\"submit-widget button-field button-cancel\"\n value=\"Anuluj\" type=\"submit\"\n onclick=\"return ST.dialogs.close(this);\" \/>\n\n\n \n <\/div>\n <\/div>\n \n \n \n \n<\/form>\n<\/div>\n", "dialog": {"resizable": false, "width": "560", "draggable": false, "autoOpen": true, "modal": true, "position": ["center", "middle"]}}

What's wrong..

Question information

Language:
English Edit question
Status:
Solved
For:
SchoolTool Edit question
Assignee:
No assignee Edit question
Solved by:
Douglas Cerna
Solved:
2015-09-16
Last query:
2015-09-16
Last reply:
2015-09-16
Douglas Cerna (replaceafill) said : #1

It looks like a JavaScript related issue.

Does it happen when you click on the report link on the sidebar or when you get the dialog with the Generate/Cancel buttons?

It could also be a cache related issue. What browser are you using? Could you try on a different browser or fully reload the page?

lioninzion (lou-7) said : #2

I tried clean the cache of Chrome, that I use as browser ... This happen when I click on the sidebar already....

lioninzion (lou-7) said : #3

Anyone have any idea??

Douglas Cerna (replaceafill) said : #4

Could you get Chrome's console log when you load the page (the one with the link)? I suspect there's some Javascript code broken somewhere.

lioninzion (lou-7) said : #5

show me that before I press on the sidebar to generate raport..:

Uncaught TypeError: Cannot read property 'msie' of undefined(anonymous function) @ jquery.tree.js:1812n.Callbacks.j @ jquery.min.js:2n.Callbacks.k.fireWith @ jquery.min.js:2n.extend.ready @ jquery.min.js:2I @ jquery.min.js:2

lioninzion (lou-7) said : #6
Douglas Cerna (replaceafill) said : #7

Are you using a web server in front of SchoolTool?

lioninzion (lou-7) said : #8

I am using Apache2 and created virtual host as in manual for creating subdomain use, maybe I should specify some MIME types inside apache or .httaccess ?

Douglas Cerna (replaceafill) said : #9

Could you try accessing SchoolTool directly (http://book.schooltool.org/remote.html) and see if the Javascript error persists?

lioninzion (lou-7) said : #10

i've done it, accessed from http://192.168.2.113:7080 and still the same issue...

Douglas Cerna (replaceafill) said : #11

OK. That leaves web server issues out.

Does the same happen if you access SchoolTool directly (port 7080) from a different browser?

Douglas Cerna (replaceafill) said : #12

Never mind. I think I know what the issue is.

I just visited your website and noticed:

http://sp6.dozp.pl/@@/jquery/jquery.min.js

points to jQuery version 2.1.1 and SchoolTool works with jQuery 1.7.2

Are you running this on Ubuntu 14.04?

lioninzion (lou-7) said : #13

Yes I got 14.04

lioninzion (lou-7) said : #14

should I downgrade jQuery?

Best Douglas Cerna (replaceafill) said : #15

You could try downgrading but it could mess up other applications you might be running in that server.

If SchoolTool is your only service there then I guess it's fine, but AFAIK the standard version for package libjs-jquery in 14.04 should be 1.7.2+dfsg-2ubuntu1 (unless I'm missing something).

lioninzion (lou-7) said : #16

Thanks Douglas Cerna, that solved my question.