[Xerte-dev] Re: Export Code

Ron Mitchell ronm at mitchellmedia.co.uk
Mon Apr 30 18:24:56 BST 2012


You guessed correctly Pat - adding that proved your theory correct e.g.
export works, no corrupted zip and languages folder and config included so
exported LO plays.

That said I was testing the export while logged in so not sure why it wasn't
picking up that session.

Given the subsequent discussion between you and Tom re all the files should
be included it sounds like this won't suffice anyway. If that's the case
what's the solution?

Tom do you need confirmation from Julian that going with PHP 5.2+ is ok?
Also when would we be able to include the xwd builder/rebuilder in the
management section?

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 Pat Lockley
Sent: 30 April 2012 17:42
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Export Code

is this export when logged in?

I would guess $_SESSION doesn't exist in export as it can be used by people
not logged in?

put something like

if(!isset($_SESSION['default_language'])){

$_SESSION['default_language'] = "en-gb"; (or whatever it is)

}

before the language copy code.

On Mon, Apr 30, 2012 at 5:09 PM, Ron Mitchell <ronm at mitchellmedia.co.uk>
wrote:
> Thanks Pat but no luck so far :-(
> Been testing this, commenting out headers lines etc but export worked 
> fine in terms of not a corrupt zip before Julian added the following:
>
> mkdir($dir_path . 'languages');
>        chmod($dir_path . 'languages', 0777);
>        array_push($delete_folder_array, $dir_path . 'languages');
>
>
>        copy($xerte_toolkits_site->root_file_path .
> "languages/language-config.xml", $dir_path .
> "languages/language-config.xml");
>
>        array_push($delete_file_array,  $dir_path .
> "languages/language-config.xml");
>
>
>        copy($xerte_toolkits_site->root_file_path . "languages/engine_" .
> $_SESSION['default_language'] . ".xml", $dir_path . "languages/engine_" .
> $_SESSION['default_language'] . ".xml");
>
>        array_push($delete_file_array,  $dir_path . "languages/engine_" .
> $_SESSION['default_language'] . ".xml");
>
> and export also works with the lest two of those lines commented out e.g.
>
>        //copy($xerte_toolkits_site->root_file_path . "languages/engine_" .
> $_SESSION['default_language'] . ".xml", $dir_path . "languages/engine_" .
> $_SESSION['default_language'] . ".xml");
>
>        //array_push($delete_file_array,  $dir_path . "languages/engine_" .
> $_SESSION['default_language'] . ".xml");
>
> Could the issue be with $_SESSION['default_language']? I tried 
> removing the session reference and replacing with en-GB but without 
> success. However with those two lines commented out the export does 
> include the languages folder just not the engine_en-GB.xml file so play
still doesn't work.
>
> HTH
> Ron
>
> -----Original Message-----
> From: xerte-dev-bounces at lists.nottingham.ac.uk
> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat 
> Lockley
> Sent: 30 April 2012 14:13
> To: For Xerte technical developers
> Subject: [Xerte-dev] Re: Export Code
>
> it might be in archive - it's not wrong per say - there was one option 
> with the PHP header settings which broke it in IE and firefox.
>
> Try commenting out the header lines to see if it changes stuff.
>
> On Mon, Apr 30, 2012 at 2:11 PM, Ron Mitchell 
> <ronm at mitchellmedia.co.uk>
> wrote:
>> Can't find any reference to header in export.php but then can't in 
>> previous versions either?
>> There is reference to header in archive.php but can't spot anything 
>> wrong with that.
>>
>> -----Original Message-----
>> From: xerte-dev-bounces at lists.nottingham.ac.uk
>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat 
>> Lockley
>> Sent: 30 April 2012 13:47
>> To: For Xerte technical developers
>> Subject: [Xerte-dev] Re: Export Code
>>
>> in export.php there is a call to a php function called header
>>
>> whenever a zip is corrupt on export I'd look there.
>>
>> Compare those calls to the current zip
>>
>> On Mon, Apr 30, 2012 at 1:45 PM, Ron Mitchell 
>> <ronm at mitchellmedia.co.uk>
>> wrote:
>>> Not sure what that means :-( Where do we look/check for that?
>>>
>>> -----Original Message-----
>>> From: xerte-dev-bounces at lists.nottingham.ac.uk
>>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Pat 
>>> Lockley
>>> Sent: 30 April 2012 13:43
>>> To: For Xerte technical developers
>>> Subject: [Xerte-dev] Re: Export Code
>>>
>>> have the header calls in PHP changed?
>>>
>>> On Mon, Apr 30, 2012 at 1:36 PM, Ron Mitchell 
>>> <ronm at mitchellmedia.co.uk>
>>> wrote:
>>>> Hi Julian
>>>>
>>>> not sure if you've tried export since updating export.php but I 
>>>> uploaded to the test server and my local copies and all of them now 
>>>> generate corrupt zips? Tried Firefox as well as IE so it's not the 
>>>> old/intermittent IE problem.
>>>>
>>>> HTH
>>>>
>>>> Ron
>>>>
>>>>
>>>>
>>>> From: xerte-dev-bounces at lists.nottingham.ac.uk
>>>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of 
>>>> Julian Tenney
>>>> Sent: 30 April 2012 12:09
>>>> To: For Xerte technical developers
>>>> Subject: [Xerte-dev] Re: Export Code
>>>>
>>>>
>>>>
>>>> Yes, with a dash. I looked it up somewhere, I thought that was the 
>>>> ‘standard’ way?
>>>>
>>>>
>>>>
>>>> Why rename $SESSION[‘default_language’]? Seems appropriate..?
>>>>
>>>>
>>>>
>>>> From: xerte-dev-bounces at lists.nottingham.ac.uk
>>>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of 
>>>> David Goodwin
>>>> Sent: 30 April 2012 12:08
>>>> To: For Xerte technical developers
>>>> Subject: [Xerte-dev] Re: Export Code
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 30 Apr 2012, at 12:00, Julian Tenney wrote:
>>>>
>>>>
>>>>
>>>> $_SESSION['default_language']
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> It's identical to the directory name in /languages/. E.g. en-GB (I
>> think).
>>>>
>>>>
>>>>
>>>> I've only noticed en_GB (using an underscore) before, but you seem 
>>>> to use en-GB (using a dash '-')
>>>>
>>>>
>>>>
>>>> David.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> This would be the string ‘en_GB’, right?
>>>>
>>>>
>>>>
>>>> From: xerte-dev-bounces at lists.nottingham.ac.uk
>>>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of 
>>>> David Goodwin
>>>> Sent: 30 April 2012 10:43
>>>> To: For Xerte technical developers
>>>> Subject: [Xerte-dev] Re: Export Code
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 30 Apr 2012, at 09:02, Julian Tenney wrote:
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> I re-added the export code I originally added in rev 60 back into 
>>>> export.php. How to know which language to export? Also, the way the 
>>>> the engine handles languages is to look in language-config.php. How 
>>>> to know what is indicated in there?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> language-config.php ?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> You could use $_SESSION['default_language'] - although perhaps this 
>>>> variable needs renaming.
>>>>
>>>>
>>>>
>>>> thanks,
>>>>
>>>> David.
>>>>
>>>>
>>>>
>>>> Pale Purple Ltd.  (Company No: 5580814)
>>>>
>>>> 'Business Web Application Development and Training in PHP'
>>>>
>>>>
>>>>
>>>> http://www.palepurple.co.uk
>>>>
>>>> Office: 0845 0046746     Mobile: 07792380669
>>>>
>>>>
>>>>
>>>> Follow us on Twitter: @PalePurpleLtd
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 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.
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Xerte-dev mailing list
>>> Xerte-dev at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>>>
>>>
>>> _______________________________________________
>>> Xerte-dev mailing list
>>> Xerte-dev at lists.nottingham.ac.uk
>>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>>
>> _______________________________________________
>> Xerte-dev mailing list
>> Xerte-dev at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>>
>>
>> _______________________________________________
>> Xerte-dev mailing list
>> Xerte-dev at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

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




More information about the Xerte-dev mailing list