[Xerte-dev] Re: Invalid backend response. Data is not JSON.

Smith, John J.J.Smith at gcu.ac.uk
Fri Apr 10 13:12:52 BST 2015


Ah I get it and have seen similar behaviour when working with the Flash cookie bug issue...

Most likely elfinder now has a valid session to use because you switched to guest and will continue to be able to use that session until it expires. After it expires though you will probably get similar errors...

This happened with the upload code for the flash cookie bug and caused  a lot of testing that appeared to show it working to infact just be caused by a valid session somehow being created...

Even though it is working now you may find that if you do what Brad suggested and look at the session ids being used by both parts, xot will be using the moodleid and elfinder will be using the php session that became valid while you had guest login active... that session is still valid but should clear if you restart php I would assume but don't know enough about how xampp and php manage sessions...

Regards,

John Smith | Learning Technologist
Room A250, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA

Please address ALL support requests to hlsblt at gcu.ac.uk where one of the School Learning Technologists will pick up the job. This will ensure that all jobs are completed as promptly as possible.
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell [ronm at mitchellmedia.co.uk]
Sent: 10 April 2015 13:03
To: 'For Xerte technical developers'
Subject: [Xerte-dev] Re: Invalid backend response. Data is not JSON.

Hi John
The editor loads but when clicking to browse for any kind of media e.g. any
of the image browse buttons the elfinder browse pop up opens
http://localhost/moodle/xerte/editor/elfinder/browse.php?type=media&lang=en
and gives the error. I can't reproduce this now because removing the
integration path and then re-adding it resolved the problem. Perhaps that
was coincidental but I suspect it's related to the issue reported at
https://github.com/thexerteproject/xerteonlinetoolkits/issues/222 but made
worse by the fact that the cause of the issue is intermittant. e.g. as I
mentioned I'd been using this xampp install with Moodle authentication
enabled without problem until getting the problem at one point this morning.
Only noticed it when browsing for a new image. If it happens again I'll try
to pature the data and headers.

Cheers
Ron

-----Original Message-----
From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: 10 April 2015 12:38
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Invalid backend response. Data is not JSON.

Hi Ron,

IT would seem like the data being sent from the server is not valid JSON but
is somehow being corrupted. It would be useful to capture this data and the
headers being sent (would have been available in the console) so that we can
check it's structure. You don't say at what point you get the error. Does
the editor fully load or is it during the load cycle that it happens? I've
seen a few strange things happen with the editor where files load in the
wrong order (something which should be handled more elegantly) and they
continue to load in the wrong order when you refresh but if you close and
reopen the editor or click in the address bar and press enter then they
resolve...

Regards,

John Smith | Learning Technologist
Room A250, Govan Mbeki Building | School of Health & Life Sciences | Glasgow
Caledonian University Cowcaddens Road | Glasgow | G4 0BA

Please address ALL support requests to hlsblt at gcu.ac.uk where one of the
School Learning Technologists will pick up the job. This will ensure that
all jobs are completed as promptly as possible.
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk
[xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
[ronm at mitchellmedia.co.uk]
Sent: 10 April 2015 12:32
To: 'For Xerte technical developers'
Subject: [Xerte-dev] Re: Invalid backend response. Data is not JSON.

Exploring this further I first tried using the purge all caches function via
Moodle admin and same problem existed.
I then removed the integration_path from site_details and tried again via
guest and all worked fine.
I then re-added the integration_path and tested again via guest and all
still worked fine.
Changed auth_config back to using Moodle authentication and all still
working fine.
Not sure if that helps apart from seemingly being a fix for a previously
working install using Moodle authentication that had become broken but works
again after removing and re-adding the integration_path. I guess somewhere
these steps are killing the conflicting session or cache but not sure what's
causing the conflict in the first place and clearly that's what we need to
identify.
Ron

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 10 April 2015 12:06
To: 'For Xerte technical developers'
Subject: [Xerte-dev] Invalid backend response. Data is not JSON.

Hi all
I'm posting here but have also posted to the issue reported by Brad I think
at https://github.com/thexerteproject/xerteonlinetoolkits/issues/222

I've been testing some stuff on a localhost xampp installation on and off
over the last few days and again this morning. This is recent develop code
but not the very latest. I'm not sure what caused this but now when I try to
edit an existing or new LO and browser for media I get the following error:

Invalid backend response. Data is not JSON.

This happens regardless of account, browser, project etc and I've completely
shut down xampp, cleared session files and re-started but still the same
problem. I remember having similar problems in a much earlier test version
on the Techdis server where there was more than one install and liaising
with Tom but never resolving it then and in this local xampp instance
there's only a singe XOT install. It also inside a Moodle directory like the
Techdis server was but has been working fine until this problem arose this
morning and now even with auth_config set to guest or static effectively the
install is broken because it's not possible to browse for media. In this
case I can potentially just scrap and replace the install but I seem to
recall when I tried that on the Techdis server previously it didn't resolve
the problem and I'm worried about this happening on live installations.
There are plenty using Moodle authentication.

Any additional ideas re cause/solution?

This happens when the pop-up opens:
http://localhost/moodle/xerte/editor/elfinder/browse.php?type=media&lang=en

And the FF console shows 2 repeat errors:
Line 1339 toolbox.js
console.log('Browse file: ' + id + ': ' + key + ', ' +  name  + ', ' +
value);

Cheers
Ron







This message and any attachment are intended solely for the addressee

and may contain confidential information. If you have received this

message in error, please send it back to me, and immediately delete it.



Please do not use, copy or disclose the information contained in this

message or in any attachment.  Any views or opinions expressed by the

author of this email do not necessarily reflect the views of the

University of Nottingham.



This message has been checked for viruses but the contents of an

attachment may still contain software viruses which could damage your

computer system, you are advised to perform your own checks. Email

communications with the University of Nottingham may be monitored as

permitted by UK legislation.




This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it.

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the author
of this email do not necessarily reflect the views of the University of
Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system,
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.



Glasgow Caledonian University is a registered Scottish charity, number
SC021474

_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev




This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it.

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the author
of this email do not necessarily reflect the views of the University of
Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system,
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev




This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.


Glasgow Caledonian University is a registered Scottish charity, number SC021474



More information about the Xerte-dev mailing list