<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="edit-comment-hide">
<div class="comment-body markdown-body markdown-format
js-comment-body">
<p>Brad,</p>
<p>connector.php is custom code (written by me). Could you try
the following:</p>
<pre><code>//session_start();
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR."../../../config.php");
</code></pre>
<p>It will start the session in exactly the same way as it is
started in other parts of Xerte. I've verified that this keeps
working in normal circumstances. Could you please check if
this solves your issue? Than I will commit the fix.</p>
</div>
</div>
Thank you!<br>
<br>
Tom<br>
<br>
<br>
<div class="moz-cite-prefix">Smith, Bradley schreef op 10-4-2015 om
16:34:<br>
</div>
<blockquote
cite="mid:2984F265-3126-4C97-B7CE-60F13AB28DC4@akamai.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div class="">John,</div>
<div class=""><br class="">
</div>
<div class="">At least for me, the reason for the “Data is not
JSON” error is that elfinder isn’t using the same session as
Xerte+moodle_auth, and when it can’t find evidence of a login it
redirects to index.php, the output of which is the “invalid
JSON” that is sent in response to the AJAX call. </div>
<div class=""><br class="">
</div>
<div class="">See the<a moz-do-not-send="true"
href="https://github.com/thexerteproject/xerteonlinetoolkits/issues/222"
class=""> issue report on GitHub</a> for details. </div>
<div class=""><br class="">
</div>
<div class="">Thanks for following up on this, Ron!</div>
<div class=""><br class="">
</div>
<div class="">—Brad</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 10, 2015, at 7:37 AM, Smith, John <<a
moz-do-not-send="true" href="mailto:J.J.Smith@gcu.ac.uk"
class="">J.J.Smith@gcu.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">Hi Ron,<br class="">
<br class="">
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...<br class="">
<br class="">
Regards,<br class="">
<br class="">
John Smith | Learning Technologist<br class="">
Room A250, Govan Mbeki Building | School of Health &
Life Sciences | Glasgow Caledonian University<br class="">
Cowcaddens Road | Glasgow | G4 0BA<br class="">
<br class="">
Please address ALL support requests to <a
moz-do-not-send="true" href="mailto:hlsblt@gcu.ac.uk"
class="">hlsblt@gcu.ac.uk</a> where one of the School
Learning Technologists will pick up the job. This will
ensure that all jobs are completed as promptly as possible.<br
class="">
________________________________________<br class="">
From: <a moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk"
class="">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a
moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk"
class="">xerte-dev-bounces@lists.nottingham.ac.uk</a>] On
Behalf Of Ron Mitchell [<a moz-do-not-send="true"
href="mailto:ronm@mitchellmedia.co.uk" class="">ronm@mitchellmedia.co.uk</a>]<br
class="">
Sent: 10 April 2015 12:32<br class="">
To: 'For Xerte technical developers'<br class="">
Subject: [Xerte-dev] Re: Invalid backend response. Data is
not JSON.<br class="">
<br class="">
Exploring this further I first tried using the purge all
caches function via Moodle admin and same problem existed.<br
class="">
I then removed the integration_path from site_details and
tried again via guest and all worked fine.<br class="">
I then re-added the integration_path and tested again via
guest and all still worked fine.<br class="">
Changed auth_config back to using Moodle authentication and
all still working fine.<br class="">
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.<br class="">
Ron<br class="">
<br class="">
From: <a moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk"
class="">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a
moz-do-not-send="true"
href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk"
class="">mailto:xerte-dev-bounces@lists.nottingham.ac.uk</a>]
On Behalf Of Ron Mitchell<br class="">
Sent: 10 April 2015 12:06<br class="">
To: 'For Xerte technical developers'<br class="">
Subject: [Xerte-dev] Invalid backend response. Data is not
JSON.<br class="">
<br class="">
Hi all<br class="">
I'm posting here but have also posted to the issue reported
by Brad I think at <a moz-do-not-send="true"
href="https://github.com/thexerteproject/xerteonlinetoolkits/issues/222"
class="">https://github.com/thexerteproject/xerteonlinetoolkits/issues/222</a><br
class="">
<br class="">
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:<br class="">
<br class="">
Invalid backend response. Data is not JSON.<br class="">
<br class="">
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.<br class="">
<br class="">
Any additional ideas re cause/solution?<br class="">
<br class="">
This happens when the pop-up opens:<br class="">
<a moz-do-not-send="true"
href="http://localhost/moodle/xerte/editor/elfinder/browse.php?type=media&lang=en"
class="">http://localhost/moodle/xerte/editor/elfinder/browse.php?type=media&lang=en</a><br
class="">
<br class="">
And the FF console shows 2 repeat errors:<br class="">
Line 1339 toolbox.js<br class="">
console.log('Browse file: ' + id + ': ' + key + ', ' + name
+ ', ' + value);<br class="">
<br class="">
Cheers<br class="">
Ron<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
This message and any attachment are intended solely for the
addressee<br class="">
<br class="">
and may contain confidential information. If you have
received this<br class="">
<br class="">
message in error, please send it back to me, and immediately
delete it.<br class="">
<br class="">
<br class="">
<br class="">
Please do not use, copy or disclose the information
contained in this<br class="">
<br class="">
message or in any attachment. Any views or opinions
expressed by the<br class="">
<br class="">
author of this email do not necessarily reflect the views of
the<br class="">
<br class="">
University of Nottingham.<br class="">
<br class="">
<br class="">
<br class="">
This message has been checked for viruses but the contents
of an<br class="">
<br class="">
attachment may still contain software viruses which could
damage your<br class="">
<br class="">
computer system, you are advised to perform your own checks.
Email<br class="">
<br class="">
communications with the University of Nottingham may be
monitored as<br class="">
<br class="">
permitted by UK legislation.<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
This message and any attachment are intended solely for the
addressee<br class="">
and may contain confidential information. If you have
received this<br class="">
message in error, please send it back to me, and immediately
delete it.<br class="">
<br class="">
Please do not use, copy or disclose the information
contained in this<br class="">
message or in any attachment. Any views or opinions
expressed by the<br class="">
author of this email do not necessarily reflect the views of
the<br class="">
University of Nottingham.<br class="">
<br class="">
This message has been checked for viruses but the contents
of an<br class="">
attachment may still contain software viruses which could
damage your<br class="">
computer system, you are advised to perform your own checks.
Email<br class="">
communications with the University of Nottingham may be
monitored as<br class="">
permitted by UK legislation.<br class="">
<br class="">
<br class="">
<br class="">
Glasgow Caledonian University is a registered Scottish
charity, number SC021474<br class="">
<br class="">
_______________________________________________<br class="">
Xerte-dev mailing list<br class="">
<a class="moz-txt-link-abbreviated" href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br class="">
<a class="moz-txt-link-freetext" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><br
class="">
<br class="">
<br class="">
<br class="">
<br class="">
This message and any attachment are intended solely for the
addressee<br class="">
and may contain confidential information. If you have
received this<br class="">
message in error, please send it back to me, and immediately
delete it. <br class="">
<br class="">
Please do not use, copy or disclose the information
contained in this<br class="">
message or in any attachment. Any views or opinions
expressed by the<br class="">
author of this email do not necessarily reflect the views of
the<br class="">
University of Nottingham.<br class="">
<br class="">
This message has been checked for viruses but the contents
of an<br class="">
attachment may still contain software viruses which could
damage your<br class="">
computer system, you are advised to perform your own checks.
Email<br class="">
communications with the University of Nottingham may be
monitored as<br class="">
permitted by UK legislation.<br class="">
<br class="">
</div>
</blockquote>
</div>
<br class="">
<pre>
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.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xerte-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
--
Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196
</pre>
</body>
</html>