PeterAllfonds schrieb
Ich bekomme nur die folgende Meldung
Expand file: 'T3D__07-04-11-30-58-z.t3d'...
Warning: Invalid argument supplied for foreach() in expandt3x.php on line 65
und es wird nichts extrahiert. Es handelt sich um einen einfachen export einer TYPO3 Site, den ich fehlerfrei importieren kann.
Oder soll das Tool nur für Extensions funktionieren?
es ist ein *.t3x entpacker und kein *.t3d entpacker ;-)
also nur für extensions.
Eine t3d müsste ja größtenteils aus datenbankdumps bestehen
So, nun habe ich die Erweiterung tt_news ausgepackt und per FTP hochgeladen. Das ganze Zeug liegt jetzt im Verzeichnis
cms/typo3conf/ext/tt_news
(Hintergrund: Mein Webspace ist langsaaam. Beim Retrieve/Update kommt ein Timeout-Fehler. So erfährt mein Typo3 nicht, dass es eine solche Extension "tt_news" gibt. Das Standard-Precedere geht also nicht.)
Schaue ich mir jetzt die "Loaded Extensions" an, ist diese Erweiterung nicht enthalten, obwohl ich sie manuell hochgeladen habe.
Wie kann ich nun meinem System die bereits hochgeladene Extension zeigen, damit ich sie installieren kann?
Pfiffikus,
der gerne die neuesten Neuigkeiten präsentieren möchte
Du wählst statt "Loaded Extensions" eben Install Extensions und drückst auf das + vor tt_news...
Aber warum so kompliziert? Nur weil du die Liste im EM nicht geladen bekommst, kannst du doch dennoch unter Import Extensions die .t3x Importieren...
Diese Option würde ich gerne wählen. Hab ich auch schon probiert. Aber nach einer längeren Wartezeit erscheint die Meldung:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Pfiffikus,
der auch an dieser Stelle einen Timeout vermutet
Ich hatte dasselbe Problem, mit derselben Extension.
Es scheint so zu sein, dass zwa Typo3 4.17 stabil zum laufen zu bekommen ist auf 1&1 Business jedenfalls, probleme bekomme ich immer wieder nur beim ExtManager: händisch t3x-files hochladen geht ja meistens, es sei denn, die Dateien sind so um die 1.0 MB groß. Da scheint ein Timeout daz entpacken etc zu verhindern.
Nun ist es so, dass z.B. in der tt_news (v2.5.2) die Dokumentation den größten Teil der Datei einnimmt. Wenn man sich diese auf typo3.org separat runterlädt, kann man auf diesen Teil im t3x-file gut verzichten und hat somit nur noch ca 300KB übrig. Damit funktioniert dann auch die Installation bei 1&1 problemfrei.
Um das zu bewerkstelligen hatte ich diesen Thread bzgl. Packen und Entpacken gefunden, was allerdings alles etwas umständlich für mich schien. Ganz schnelle und dreckige Lösung also:
auf nem anderen Typo3 System (zum Glück habe ich auch einige bei besseren Provider am Start...) oder eben dem lokalen System die OriginalVariante installiert, per ftp oder so, die zu große Dokumentation gelöscht,
im ExtManager die Extension wieder exportiert.
Damit habe ich nun eine Light-Version 2.5.2 von tt_news, an der GARNICHTS verändert ist, ausser, dass die Doku fehlt...
Wer's brauchen kann: http://www.proszenium.com/fileadmin/tt_news-2_3_2_LIGHT.t3x
Funktioniert jetzt mit Typo3 4.5
neu: extension als standard-ordnername
<?php
require('/path/to/typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php');
// Usage ausgeben
function printUsageAndDie(){
global $argv;
print <<<EOM
------------------------------------------------------------------------------
_____ _ _ _____
| ____|_ ___ __ __ _ _ __ __| | | |_|___ /_ __
| _| \ \/ / '_ \ / _` | '_ \ / _` | | __| |_ \ \/ /
| |___ > <| |_) | (_| | | | | (_| | | |_ ___) > <
|_____/_/\_\ .__/ \__,_|_| |_|\__,_| \__|____/_/\_\ Version 0.2, 11.04.2011
|_|
...written by droptix and luwo. (look at http://www.typo3.net/forum)
...and Jonny007-MKD
Usage: expand_t3x.php [filename.t3x] <directory>
* filename.t3x = Name of your t3x-file
* directory = optional directory of extraction (default=name of extension)
------------------------------------------------------------------------------
EOM;
die();
}
// Wurde eine Datei angegeben?
if (count($argv) <=1) { printUsageAndDie(); }
// Wurde ein Auspackverzeichnis angegeben?
if ($argv[2] != '') $unpackDir=$argv[2];
else $unpackDir=substr($argv[1], 0, -4);
// Datei aus Kommandozeile holen...
$extFile=$argv[1];
if (file_exists($extFile)) { print "\n Entpacke Datei: '$extFile'...\n\n";}
else{ print "\n Datei: '$extFile' wurde leider nicht gefunden \n"; printUsageAndDie();}
// Start unpacking.
$fileContent = file_get_contents($extFile);
$ext = tx_em_Connection_Ter::decodeExchangeData($fileContent);
function autocreate_subdirs($dir) {
$path = array();
$subdirs = explode("/", $dir);
foreach ($subdirs as $subdir) {
$path[] = $subdir;
$fullPath = implode("/", $path);
if (!file_exists($fullPath)) {
if (mkdir($fullPath)) {
echo sprintf("OK: created directory '%s'\n", $fullPath);
} else {
echo sprintf("ERROR: directory '%s' not created\n", $fullPath);
}
}
}
}
// Unpack extension(s).
foreach ($ext as $e) {
if ($e["EM_CONF"]) {
// Create unpack directory.
if (!file_exists($unpackDir)) {
mkdir($unpackDir);
}
// Create directories.
$dirs = explode(",", $e["EM_CONF"]["createDirs"]);
foreach ($dirs as $dir) {
// Start in unpack directory if any.
if ($unpackDir) {
$dir = $unpackDir."/".$dir;
}
autocreate_subdirs($dir);
}
// Write files.
foreach ($e["FILES"] as $file) {
// Start in unpack directory.
if (empty($unpackDir)) {
$path = array();
} else {
$path = array($unpackDir);
}
$tmp = explode("/", $file["name"]);
// Separate file name and rest path.
$fileName = array_pop($tmp);
$path = array_merge($path, $tmp);
unset($tmp);
// Create subdirs if neccessary.
$dirPath = implode("/", $path);
autocreate_subdirs($dirPath);
// Write file.
$path[] = $fileName;
$fullPath = implode("/", $path);
$handle = fopen($fullPath, "wb");
if ($handle && fwrite($handle, $file["content"])) {
fclose($handle);
echo sprintf("OK: wrote file '%s'\n", $fullPath);
} else {
echo sprintf("ERROR: file '%s' not written\n", $fullPath);
}
}
}
}
?>
Jonny007MKD schrieb
Funktioniert jetzt mit Typo3 4.5
neu: extension als standard-ordnername
<?php
require('/path/to/typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php');
// Usage ausgeben
function printUsageAndDie(){
global $argv;
print <<<EOM
------------------------------------------------------------------------------
_____ _ _ _____
| ____|_ ___ __ __ _ _ __ __| | | |_|___ /_ __
| _| \ \/ / '_ \ / _` | '_ \ / _` | | __| |_ \ \/ /
| |___ > <| |_) | (_| | | | | (_| | | |_ ___) > <
|_____/_/\_\ .__/ \__,_|_| |_|\__,_| \__|____/_/\_\ Version 0.2, 11.04.2011
|_|
...written by droptix and luwo. (look at http://www.typo3.net/forum)
...and Jonny007-MKD
Usage: expand_t3x.php [filename.t3x] <directory>
* filename.t3x = Name of your t3x-file
* directory = optional directory of extraction (default=name of extension)
------------------------------------------------------------------------------
EOM;
die();
}
// Wurde eine Datei angegeben?
if (count($argv) <=1) { printUsageAndDie(); }
// Wurde ein Auspackverzeichnis angegeben?
if ($argv[2] != '') $unpackDir=$argv[2];
else $unpackDir=substr($argv[1], 0, -4);
// Datei aus Kommandozeile holen...
$extFile=$argv[1];
if (file_exists($extFile)) { print "\n Entpacke Datei: '$extFile'...\n\n";}
else{ print "\n Datei: '$extFile' wurde leider nicht gefunden \n"; printUsageAndDie();}
// Start unpacking.
$fileContent = file_get_contents($extFile);
$ext = tx_em_Connection_Ter::decodeExchangeData($fileContent);
function autocreate_subdirs($dir) {
$path = array();
$subdirs = explode("/", $dir);
foreach ($subdirs as $subdir) {
$path[] = $subdir;
$fullPath = implode("/", $path);
if (!file_exists($fullPath)) {
if (mkdir($fullPath)) {
echo sprintf("OK: created directory '%s'\n", $fullPath);
} else {
echo sprintf("ERROR: directory '%s' not created\n", $fullPath);
}
}
}
}
// Unpack extension(s).
foreach ($ext as $e) {
if ($e["EM_CONF"]) {
// Create unpack directory.
if (!file_exists($unpackDir)) {
mkdir($unpackDir);
}
// Create directories.
$dirs = explode(",", $e["EM_CONF"]["createDirs"]);
foreach ($dirs as $dir) {
// Start in unpack directory if any.
if ($unpackDir) {
$dir = $unpackDir."/".$dir;
}
autocreate_subdirs($dir);
}
// Write files.
foreach ($e["FILES"] as $file) {
// Start in unpack directory.
if (empty($unpackDir)) {
$path = array();
} else {
$path = array($unpackDir);
}
$tmp = explode("/", $file["name"]);
// Separate file name and rest path.
$fileName = array_pop($tmp);
$path = array_merge($path, $tmp);
unset($tmp);
// Create subdirs if neccessary.
$dirPath = implode("/", $path);
autocreate_subdirs($dirPath);
// Write file.
$path[] = $fileName;
$fullPath = implode("/", $path);
$handle = fopen($fullPath, "wb");
if ($handle && fwrite($handle, $file["content"])) {
fclose($handle);
echo sprintf("OK: wrote file '%s'\n", $fullPath);
} else {
echo sprintf("ERROR: file '%s' not written\n", $fullPath);
}
}
}
}
?>
Nach dem entpacken bekomme ich leider eine Fehlermeldung:
Notice: Uninitialized string offset: 0 in /home/srv/www/htdocs/expandt3x/expandt3x.php on line 69
Call Stack:
0.0011 76812 1. {main}() /home/srv/www/htdocs/expandt3x/expandt3x.php:0
Variables in local scope (#1):
$argv = array (0 => 'expandt3x.php', 1 => 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804.t3x')
$dir = 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804/uploads/tx_charbeitsbeispiele/'
$dirPath = 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804/res'
$dirs = array (0 => 'uploads/tx_charbeitsbeispiele/')
$e = ''
$ext = array (0 => array ('extKey' => 'ch_arbeitsbeispiele', 'EM_CONF' => array (...), 'misc' => array (...), 'techInfo' => array (...), 'FILES' => array (...)), 1 => '')
$extFile = 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804.t3x'
$file = array ('name' => 'res/system.css', 'size' => 7227, 'mtime' => 1318886996, 'is_executable' => FALSE, 'content' => '/****************************************************/\r/* Transitions\t \t\t\t */\r/****************************************************/\r/* ab hier bitte nicht ändern */\r\r#tx-charbeitsbeispiele-pi1 .masonry,\r#tx-charbeitsbeispiele-pi1 .masonry .masonry-brick\r{\r -webkit-transition-duration: 0.7s;\r -moz-transition-duration: 0.7s;\r -o-transition-duration: 0.7s;\r transition-duration: 0.7s;\r}\r\r#tx-charbeitsbeispiele-pi1 .masonry\r{\r -webkit-transition-property: he...', 'content_md5' => '7967aac9b453d51b96e3fbdc5563cebb')
$fileContent = '22b2bef99eff8d3b56020e34a0b4e7b1:gzcompress:x???Kl,I? ?V\002??\fF:\t?\016??8\025?W????L~???d=v??\\2Y?%>NNd?\'3??\031?\021???s\020\006{?$@?\000\001\v,tZ`??.{?\026ZhF\003\b?A\v\035??\000A??\037\020t\032???GxDF~??W????j??pwsss3ssssw??V?\020???\006\037~???^?\033v?e?m??\001?\t?.?qL?\033?7???Cc?W*Xv?n?n(?\024-????\003?w???\r??:?k?\017?*k?\017? ????\016,?\by?7\032?w???w??\a??\001???@\017?\v\b?\006?Z!??|j\002?g?\033?\003?b?®??\v ??u?k?\032?\020Z\025???}???7(?\016:??????\005??P?\033A?????*??!\0378...'
$fileName = 'system.css'
$fullPath = 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804/res/system.css'
$handle = resource(63) of type (Unknown)
$path = array (0 => 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804', 1 => 'res', 2 => 'system.css')
$tmp = *uninitialized*
$unpackDir = 'T3X_ch_arbeitsbeispiele-0_0_0-z-201111051804'
Ohne externe Abhängigkeiten gibts jetzt auch eine Benutzbarkeit für einfache Anwendung:
http://www.kopfpit.de/wordpress/goodies/
Danke!
Funktioniert jetzt mit Typo3 4.5
neu: extension als standard-ordnername
Bei mir funktioniert's!
Vielen Dank, geniales Tool. 🙂
Dietmar
Hi,
ich hab das expand_t3x.php Script aktualisiert, da es bei mir einige Fehler / Warnungen rausgeworfen hat:
<?php
require('/path/to/typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php');
// Usage ausgeben
function printUsageAndDie(){
global $argv;
print <<<EOM
------------------------------------------------------------------------------
_____ _ _ _____
| ____|_ ___ __ __ _ _ __ __| | | |_|___ /_ __
| _| \ \/ / '_ \ / _` | '_ \ / _` | | __| |_ \ \/ /
| |___ > <| |_) | (_| | | | | (_| | | |_ ___) > <
|_____/_/\_\ .__/ \__,_|_| |_|\__,_| \__|____/_/\_\ Version 0.3, 21.01.2013
|_|
...written by droptix and luwo. (look at http://www.typo3.net/forum)
...and Jonny007-MKD
...and some fixes by ViRuSTriNiTy
Usage: expand_t3x.php [filename.t3x] <directory>
* filename.t3x = Name of your t3x-file
* directory = optional directory of extraction (default=name of extension)
------------------------------------------------------------------------------
EOM;
die();
}
// Wurde eine Datei angegeben?
if (count($argv) <=1) { printUsageAndDie(); }
// Wurde ein Auspackverzeichnis angegeben?
if ($argv[2] != '') $unpackDir=$argv[2];
else $unpackDir=substr($argv[1], 0, -4);
// Datei aus Kommandozeile holen...
$extFile=$argv[1];
if (file_exists($extFile)) { print "\n Entpacke Datei: '$extFile'...\n\n";}
else{ print "\n Datei: '$extFile' wurde leider nicht gefunden \n"; printUsageAndDie();}
// Start unpacking.
$fileContent = file_get_contents($extFile);
$terUtility = new tx_em_Connection_Ter(null);
$ext = $terUtility->decodeExchangeData($fileContent);
function autocreate_subdirs($dir) {
$path = array();
$subdirs = explode("/", $dir);
foreach ($subdirs as $subdir) {
$path[] = $subdir;
$fullPath = implode("/", $path);
if (!file_exists($fullPath)) {
if (mkdir($fullPath)) {
echo sprintf("OK: created directory '%s'\n", $fullPath);
} else {
echo sprintf("ERROR: directory '%s' not created\n", $fullPath);
}
}
}
}
// Unpack extension(s).
foreach ($ext as $e) {
if (is_array($e) && array_key_exists("EM_CONF", $e) && $e["EM_CONF"]) {
// Create unpack directory.
if (!file_exists($unpackDir)) {
mkdir($unpackDir);
}
// Create directories.
$dirs = explode(",", $e["EM_CONF"]["createDirs"]);
foreach ($dirs as $dir) {
// Start in unpack directory if any.
if ($unpackDir) {
$dir = $unpackDir."/".$dir;
}
autocreate_subdirs($dir);
}
// Write files.
foreach ($e["FILES"] as $file) {
// Start in unpack directory.
if (empty($unpackDir)) {
$path = array();
} else {
$path = array($unpackDir);
}
$tmp = explode("/", $file["name"]);
// Separate file name and rest path.
$fileName = array_pop($tmp);
$path = array_merge($path, $tmp);
unset($tmp);
// Create subdirs if neccessary.
$dirPath = implode("/", $path);
autocreate_subdirs($dirPath);
// Write file.
$path[] = $fileName;
$fullPath = implode("/", $path);
if (!is_dir($fullPath))
{
$handle = fopen($fullPath, "wb");
if ($handle && fwrite($handle, $file["content"])) {
fclose($handle);
echo sprintf("OK: wrote file '%s'\n", $fullPath);
} else {
echo sprintf("ERROR: file '%s' not written\n", $fullPath);
}
}
}
}
}
?>