[Xerte] Re: Error message when playing/publishing content of type Text

Naveed Hashmi Naveed.Hashmi at bristol.ac.uk
Fri Apr 15 12:05:26 BST 2016


The debug.log shows the following when I click 'play' with the dev version
of upload.php ..

2016-04-15 11:02:53
/var/www/html/website_code/php/database_library.php175Running : SELECT *
FROM sitedetails
2016-04-15 11:02:53 /var/www/html/editor/upload.php28upload: Array
(
    [fileupdate] => 0
    [filename] => USER-FILES/2-isnsh-Nottingham/preview.xml
    [lo_data] =>
%7B%22attributes%22%3A%7B%22nodeName%22%3A%22learningObject%22%2C%22editorVersion%22%3A%223%22%2C%22targetFolder%22%3A%22Nottingham%22%2C%22name%22%3A%22Learning%20Object%20Title%22%2C%22language%22%3A%22%22%2C%22navigation%22%3A%22Linear%22%2C%22textSize%22%3A%2212%22%2C%22theme%22%3A%22darkgrey%22%2C%22displayMode%22%3A%22default%22%2C%22responsive%22%3A%22true%22%7D%2C%22children%22%3A%7B%220%22%3A%7B%22attributes%22%3A%7B%22nodeName%22%3A%22bullets%22%2C%22linkID%22%3A%22PG1460718054579%22%2C%22name%22%3A%22Enter%20Page%20Title%22%2C%22delaySecs%22%3A%221%22%2C%22showBullets%22%3A%221%22%2C%22showPanel%22%3A%221%22%2C%22panelWidth%22%3A%22Medium%22%7D%2C%22data%22%3A%22Enter%20text%20for%20the%20page%20here%22%7D%7D%7D
    [absmedia] =>
https://xerte-beta.bris.ac.uk/USER-FILES/2-isnsh-Nottingham/
    [template_id] => 2
)

2016-04-15 11:02:53 /var/www/html/editor/upload.php53upload (lo_data):
%7B%22attributes%22%3A%7B%22nodeName%22%3A%22learningObject%22%2C%22editorVersion%22%3A%223%22%2C%22targetFolder%22%3A%22Nottingham%22%2C%22name%22%3A%22Learning%20Object%20Title%22%2C%22language%22%3A%22%22%2C%22navigation%22%3A%22Linear%22%2C%22textSize%22%3A%2212%22%2C%22theme%22%3A%22darkgrey%22%2C%22displayMode%22%3A%22default%22%2C%22responsive%22%3A%22true%22%7D%2C%22children%22%3A%7B%220%22%3A%7B%22attributes%22%3A%7B%22nodeName%22%3A%22bullets%22%2C%22linkID%22%3A%22PG1460718054579%22%2C%22name%22%3A%22Enter%20Page%20Title%22%2C%22delaySecs%22%3A%221%22%2C%22showBullets%22%3A%221%22%2C%22showPanel%22%3A%221%22%2C%22panelWidth%22%3A%22Medium%22%7D%2C%22data%22%3A%22Enter%20text%20for%20the%20page%20here%22%7D%7D%7D
2016-04-15 11:02:53 /var/www/html/editor/upload.php57upload (lo_data,
local_refs):
{"attributes":{"nodeName":"learningObject","editorVersion":"3","targetFolder":"Nottingham","name":"Learning
Object
Title","language":"","navigation":"Linear","textSize":"12","theme":"darkgrey","displayMode":"default","responsive":"true"},"children":{"0":{"attributes":{"nodeName":"bullets","linkID":"PG1460718054579","name":"Enter
Page
Title","delaySecs":"1","showBullets":"1","showPanel":"1","panelWidth":"Medium"},"data":"Enter
text for the page here"}}}
2016-04-15 11:02:53 /var/www/html/editor/upload.php63upload: decoded json


Thanks,

Naveed

On 15 April 2016 at 11:46, Tom Reijnders <reijnders at tor.nl> wrote:

> Can you please place this version of upload.php in the editor folder. It's
> the development version with debugging statements added.
>
> Then, please make sure $development is set to true, and after trying to
> saving data, look at what is in the debug.log file, and report back please.
>
> Tom
>
> Op 15-4-2016 om 12:20 schreef Naveed Hashmi:
>
> Hi Pat,
>
> Do you mean /editor/upload.php?
>
> See attached, this is how the upload.php looks at the moment.
>
> Thanks for your help,
>
> Naveed
>
> ---------------
> From Pat ...
> How much of your editor.php is commented out, as make_refs_local seems
> to be returning something which looks ok to me
> (I am running out of ideas, sorry)
>
> On 15 April 2016 at 10:23, Naveed Hashmi <Naveed.Hashmi at bristol.ac.uk>
> wrote:
>
>> This is correct, the 1 is the "true" being echoed out at the end, i.e: "echo
>> true;" (setting to this 'false' removes the '1').
>> I've commented out the print_r, i.e. "//print_r($relreffedjsonstr);" and
>> the dialogue box now shows "This project does not contain any pages."
>>
>> See attached pic, results of chrome console when enabling/disabling the
>> print_r.
>>
>> Thanks,
>>
>> Naveed
>>
>> ----------------------------------------
>> From Pat:
>>
>> The 1 is the "true" I assume being echoed out at the end?
>> Or is that still commented out?
>> Try commenting out the print_r?
>>
>> On 15 April 2016 at 08:47, Naveed Hashmi < <Naveed.Hashmi at bristol.ac.uk>
>> Naveed.Hashmi at bristol.ac.uk> wrote:
>>
>>> When clicking 'play', the error box displays, but the response now shows
>>> the following :-
>>>
>>> {"attributes":{"nodeName":"learningObject","editorVersion":"3","targetFolder":"Nottingham","name":"Learning
>>> Object
>>> Title","language":"","navigation":"Linear","textSize":"12","theme":"default","displayMode":"default","responsive":"true"},"children":{"0":{"attributes":{"nodeName":"bullets","linkID":"PG1460705925683","name":"bullets","delaySecs":"1","showBullets":"1","showPanel":"1","panelWidth":"Medium"},"data":"<p><span
>>> style=\"font-family: 'Open Sans', sans-serif; background-color: rgb(255,
>>> 255, 255);\">bullets</span></p>\n"}}}1
>>>
>>> The '1' at the end looks out of place?
>>>
>>> Thanks,
>>>
>>> Naveed
>>>
>>>
>>> On 14 April 2016 at 16:45, Pat L (pgogy) < <info at pgogywebstuff.com>
>>> info at pgogywebstuff.com> wrote:
>>>
>>>> Sorry
>>>> By console i mean the chrome dev console on the network tab
>>>>
>>>>
>>>> -------- Original message --------
>>>> From: Naveed Hashmi < <Naveed.Hashmi at bristol.ac.uk>
>>>> Naveed.Hashmi at bristol.ac.uk>
>>>> Date: 14/04/2016 16:30 (GMT+00:00)
>>>> To: "Pat L (pgogy)" < <info at pgogywebstuff.com>info at pgogywebstuff.com>
>>>> Cc: Xerte discussion list < <xerte at lists.nottingham.ac.uk>
>>>> xerte at lists.nottingham.ac.uk>
>>>> Subject: Re: Error message when playing/publishing content of type Text
>>>>
>>>> On the command line (console) ... I see ..
>>>>
>>>> $ php upload.php
>>>>
>>>> /var/www/html/website_code/php/database_library.php175Running : SELECT
>>>> * FROM sitedetails
>>>> Session is invalid or expired
>>>>
>>>> Thanks
>>>>
>>>> Naveed
>>>>
>>>> On 14 April 2016 at 16:25, Pat L (pgogy) < <info at pgogywebstuff.com>
>>>> info at pgogywebstuff.com> wrote:
>>>>
>>>>> Do you see anything in console?
>>>>>
>>>>> -------- Original message --------
>>>>> From: Naveed Hashmi < <Naveed.Hashmi at bristol.ac.uk>
>>>>> Naveed.Hashmi at bristol.ac.uk>
>>>>> Date: 14/04/2016 16:14 (GMT+00:00)
>>>>> To: Xerte discussion list < <xerte at lists.nottingham.ac.uk>
>>>>> xerte at lists.nottingham.ac.uk>
>>>>> Cc: "Pat Lockley (Pgogy)" < <info at pgogywebstuff.com>
>>>>> info at pgogywebstuff.com>
>>>>> Subject: Re: Error message when playing/publishing content of type
>>>>> Text
>>>>>
>>>>> I've enabled (uncommented) make_ref_locals, and the error displays
>>>>> with the following now in place (semi colon in place at the end of the new
>>>>> line) ...
>>>>>
>>>>> $relreffedjsonstr = make_refs_local(urldecode($lo_data),
>>>>> $_POST['absmedia']);
>>>>> print_r($relreffedjsonstr);
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Naveed
>>>>>
>>>>>
>>>>> On 14 April 2016 at 16:06, Pat Lockley (Pgogy) <
>>>>> <info at pgogywebstuff.com>info at pgogywebstuff.com> wrote:
>>>>>
>>>>>> On 2016-04-14 10:59, Naveed Hashmi wrote:
>>>>>>
>>>>>>> Hi Pat,
>>>>>>>
>>>>>>> Followed you instructions, and the Error message (box) displays with
>>>>>>> the make_refs_local function commented out and the additional line
>>>>>>> inserted.
>>>>>>>
>>>>>>> It doesn't like the additional line, re: 'print_r($relreffedjsonstr)'
>>>>>>>
>>>>>>
>>>>>> uncomment make_ref_locals
>>>>>> and add a semi colon at the end of the new line if I forgot
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
> 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 mailing listXerte at lists.nottingham.ac.ukhttp://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20160415/bed1bbe6/attachment-0001.html>


More information about the Xerte mailing list