By: Massimo
Date: 2013-03-05
Time: 12:28
|
Error Loading Template - "content.xml" is not found in the archive
Hi!
I'm trying to use TBS to compile a word model with php variables.
When I run the script and load template I get this error:
Warning: fopen(2TJ.odt) [function.fopen]: failed to open stream: No such file or directory in tbs_plugin_opentbs.php on line 2618
TinyButStrong Error OpenTBS Plugin: The file "content.xml" is not found in the archive "2TJ.odt". The process is ending, unless you
set NoErr property to true.
|
I also post below the code of my page:
<?php
// Includo lo script
include_once('tbs_plugin_opentbs/tbs_class.php');
include_once('tbs_plugin_opentbs/tbs_plugin_opentbs.php');
$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
//Passo le variabili allo script per la compilazione del documento word
$var = array();
$var[] = array('DATE'=>date("n/d/Y") , 'SOC'=>$soc , 'IND'=>$ind , /*'CITTA'=>$citta) , */ 'NAZ'=>$naz , 'NOME'=>$nome . ' ' . $cognome ,
'MATERIALE'=>$materiale , 'ALTRO'=>$other , 'NOTE'=>$note , 'OFFN'=>$offn);
// Apro il template necessario
/*$template = "/2TJ.odt";*/
$TBS->LoadTemplate('2TJ.odt');
// Merge data
$TBS->MergeBlock('a,b', $var);
// Define the name of the output file
$file_name = str_replace('.','_'.date('Y-m-d').'.',$template);
// download
$TBS->Show(OPENTBS_DOWNLOAD, $file_name);
?>
|
Could anyone help me?
Thank you,
Massimo
|
By: Skrol29
Date: 2013-03-06
Time: 22:44
|
Re: Error Loading Template - "content.xml" is not found in the archive
Hi Massimo,
The error message is not that clear, but it means OpenTBS cannot find the tempate ('2TJ.odt').
The error message will be enhanced in the next version.
|
By: Tax87
Date: 2013-03-06
Time: 22:59
|
Re: Error Loading Template - "content.xml" is not found in the archive
Hi Skrol29!
I can't try now, tomorrow I'll try and I update you. Thank you for help.
Massimo
|
By: Massimo
Date: 2013-03-07
Time: 10:28
|
Re: Error Loading Template - "content.xml" is not found in the archive
Thank you Skrol29!
Now the file will be read and I receive this error:
TinyButStrong Error in field [onshow.DATEThis message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.SOC...]: the key 'SOC' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.IND...]: the key 'IND' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.CITTA...]: the key 'CITTA' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.NAZ...]: the key 'NAZ' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.MATERIALEThis message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.ALTROThis message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.NOTEThis message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.SOC...]: the key 'SOC' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.IND...]: the key 'IND' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.CITTA...]: the key 'CITTA' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.NAZ...]: the key 'NAZ' does not exist or is not set in VarRef. (VarRef seems refers to $GLOBALS) This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.This message can be cancelled using parameter 'noerr'.
TinyButStrong Error in field [onshow.This message can be cancelled using parameter 'noerr'.
TinyButStrong Error Show() Method: The output is cancelled by the OpenTBS plugin because at least one error has occured.
|
Can you help me, please?
Thank you.
|
By: Tax87
Date: 2013-03-07
Time: 22:07
|
Re: Error Loading Template - "content.xml" is not found in the archive
Hi Skrol29!
My file have a content.xml corrupted. So I make a new file and I use another command to substitute the var in document. Tomorrow I'll post the php code.
Thank you for your time and for this free plugin!
|
|
Posting in progress.
Please wait...
|