Erros export template - xibo 1.7 beta 2

Asked by Carlos Costa

xibo 1.7 beta 2

hello

When i try to export a template i get this errors:

Warning: ZipArchive::addFromString(): Invalid or uninitialized Zip object in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1232

Warning: ZipArchive::addFromString(): Invalid or uninitialized Zip object in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1265

Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1267

Warning: filesize(): stat failed for ../uploads/temp/export_default-layout.zip in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1277

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1279

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1280

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1281

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1284

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1285

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1286

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/digitalteste/lib/data/layout.data.class.php:1232) in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1287

Warning: readfile(../uploads/temp/export_default-layout.zip): failed to open stream: No such file or directory in /home/admin/public_html/digitalteste/lib/data/layout.data.class.php on line 1299

Thanks For your attencion

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Carlos Costa
Solved:
Last query:
Last reply:
Revision history for this message
Carlos Costa (innovuela) said :
#1

sorry, i update to 1.7 BETA, now i can download the template, but the file was allways 0 bytes of size...

Revision history for this message
Hubert Haneke (error3) said :
#2

Hi Carlos,

Version 1.7.0-beta

It works for me without problems. I test it with the original "Default Layout". Also other Layouts/Templates works fine.

export_template-default-layout.zip

Content:
layout.json Size: 52
layout.xml Size: 2029
mapping.json Size: 2

Best regards,

Hubert

Revision history for this message
Hubert Haneke (error3) said :
#3

Version 1.7.0-beta

I did a fresh install, no update.

Revision history for this message
Dan Garner (dangarner) said :
#4

Can you please get a report fault troubleshoot.txt file, or a log extract.

Thanks,
Dan

Revision history for this message
Carlos Costa (innovuela) said :
#5

--------------------------------------
LOG Dump
--------------------------------------
Date,Page,Function,Message
"2014-11-29 15:35:20","Display","Touch","IN"
"2014-11-29 15:34:40","Display","Touch","IN"
"2014-11-29 15:34:27","admin","","<errormsg>Undefined variable: db</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/pages/admin.class.php</scriptname>
<scriptlinenum>286</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::addFromString(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1695</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::addFromString(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1699</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::addFile(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1718</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::addFile(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1718</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::addFile(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1718</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::addFromString(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1731</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ZipArchive::close(): Invalid or uninitialized Zip object</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1733</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>filesize(): stat failed for ../digitalteste/uploads/temp/export_teste1.zip</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1743</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ob_end_clean(): failed to delete buffer. No buffer to delete</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1769</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1770</scriptlinenum>
"
"2014-11-29 15:31:34","layout","","<errormsg>readfile(../digitalteste/uploads/temp/export_teste1.zip): failed to open stream: No such file or directory</errormsg>
<errornum>2</errornum>
<errortype>Warning</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/data/layout.data.class.php</scriptname>
<scriptlinenum>1771</scriptlinenum>
"
"2014-11-29 15:30:11","module","","<errormsg>ob_end_clean(): failed to delete buffer. No buffer to delete</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/modules/module.class.php</scriptname>
<scriptlinenum>2240</scriptlinenum>
"
"2014-11-29 15:30:11","module","","<errormsg>ob_end_clean(): failed to delete buffer. No buffer to delete</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/modules/module.class.php</scriptname>
<scriptlinenum>2240</scriptlinenum>
"
"2014-11-29 15:30:10","module","","<errormsg>ob_end_clean(): failed to delete buffer. No buffer to delete</errormsg>
<errornum>8</errornum>
<errortype>Notice</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/modules/module.class.php</scriptname>
<scriptlinenum>2240</scriptlinenum>
"

Revision history for this message
Dan Garner (dangarner) said :
#6

The first error is being hit when it tried to add to the archive - everything after that is related. I'd say that probably means the archive didn't open for some reason.

Can you try editing: lib/data/layout.data.class.php

and changing the Line 1687 to replace this:

$zip->open($fileName, ZIPARCHIVE::OVERWRITE);

with this:

$result = $zip->open($fileName, ZIPARCHIVE::OVERWRITE);
if ($result !== true)
    $this->ThrowError(__('Can\'t create ZIP. Error Code: ' . $result));

Revision history for this message
Carlos Costa (innovuela) said :
#7

Hello Dan,

After make the changes i get this error:

Can't create ZIP. Error Code: 11

 troubleshoot.txt -------------------------------------------

Date,Page,Function,Message
"2014-12-01 08:47:10","layout","","Data Class: Error Number [0] Error Message []"
"2014-12-01 08:47:10","layout","","<errormsg>Can't create ZIP. Error Code: 11</errormsg>
<errornum>256</errornum>
<errortype>User Error</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/pages/layout.class.php</scriptname>
<scriptlinenum>1259</scriptlinenum>
"
"2014-12-01 08:46:02","layout","","Data Class: Error Number [0] Error Message []"
"2014-12-01 08:46:02","layout","","<errormsg>Can't create ZIP. Error Code: 11</errormsg>
<errornum>256</errornum>
<errortype>User Error</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/pages/layout.class.php</scriptname>
<scriptlinenum>1259</scriptlinenum>
"
"2014-12-01 08:45:33","layout","","Data Class: Error Number [0] Error Message []"
"2014-12-01 08:45:33","layout","","<errormsg>Can't create ZIP. Error Code: 11</errormsg>
<errornum>256</errornum>
<errortype>User Error</errortype>
<scriptname>/home/admin/public_html/digitalteste/lib/pages/layout.class.php</scriptname>
<scriptlinenum>1259</scriptlinenum>
"

Revision history for this message
Dan Garner (dangarner) said :
#8

Can you try putting this:

File::EnsureLibraryExists();

On the file before this:

$zip = new ZipArchive();

In the same section of that file.

Revision history for this message
Carlos Costa (innovuela) said :
#9

Dan,

Same error..

What more....

Thanks

Revision history for this message
Carlos Costa (innovuela) said :
#10

Hello Dan,

I rebuilt my appache im my server, and after that its work,

Thank You

Revision history for this message
Dan Garner (dangarner) said :
#11

I think it was probably a permissions issue in that case.