Zum Inhalt springen

eigene Extension wird nicht geladen

Erstellt am 8. Oktober 2007 · 6 Antworten · letzte Antwort am 29. Oktober 2007

Tags: Frage

schnubby86 ·

Hi @ all,
ich habe folgendes Problem:
Ich habe eine eigene Extension geschrieben und diese in einem Typo3 3.8.1 installiert.
Bis dahin gab es auch kein Problem, aber die Extension wird nicht "angesprochen"...

Nun ich binde die Extension via ExtTemplate ein:
page.1 subparts.PROJEKTEABC < plugin.user_Popconfig_Email_pi1

Und den Subpart Projekteabc gibt es auch in meiner HTML Datei!! Es bestehen auch keine "vertipp" Fehler!

Hier ein kleiner Ausschnit aus meiner HTML Datei:

<table border="0" cellspacing="0" cellpadding="35" width="100%">
<tr>
<td>
<!-- ###PROJEKTEABC### START-->
<h2>- Hier kommt die Email Erweiterung hin!!!!! -</h2>
<!-- ###PROJEKTEABC### END-->
</td>
</tr>
<tr>
<td>
<!-- ###CONTENT### START-->
<h2>- Title -</h2>
<p>In Arbeit</p>
<!-- ###CONTENT### END-->
</td>

Der Inhalt des CONTENT erscheint! Wenn ich PROJEKTEABC durch CONTENT ersetze wird mir meine Extension nicht angezeigt!!
In der Extension befülle ich den $content und gebe Ihn auch standartgemäß zurück:

function main($content,$conf) {

$content = "<br /><b>Halloooooooooooo</b><br />";
return $this->pi_wrapInBaseClass($content);
t3lib_div::view_array($conf);
}

Hat jemand vielleicht eine Idee????

schnubby86 ·

Ich habe das mal mit
t3lib_div::debug($content, "content");
ausprobiert, aber er macht das einfach nicht!!!
Ich habe es jetzt im Typo3 3.8xx und in 4.1.2 ausprobiert...
Ich habe auch verschiedene Domäins (Dummy's) benutzt!!!

Es scheint beinahe so, dass die Extension nicht im geringsten geladen wird :x

Ich habe eine neue Extension geschrieben und nur ein

$content .= "HALLLOOOO";

eingefügt, und selbst das wird mir nicht angezeigt...
Und ja, der CONTENT ist richtig in dem TypoScript...

InforMedic ·

Meine eigene Extension geht im ext_typoscript_setup.txt so los:

plugin.tx_myext_pi1 = USER_INT
plugin.tx_myext_pi1 {
	###########
	# CHEADER #
	###########
	userFunc = main
	und =
	so =
	weiter =
}

Damit spreche ich die main funktion in plugin.tx_myext_pi1 an was auch funktioniert!

Meine main-funktion sieht folgendermaßen aus:

function main($content, $conf)	{
		debug($conf, "conf");   // zum debuggen!!
			// Call init function - initialises everthing
		this->init($conf);
			// get codes and decide which function is used to process the content
		$codes = t3lib_div::trimExplode(',', $this->conf['code'] ? $this->conf['code'] : $this->cmd, 1);
		if (!count($codes)) { // no code at all
			$codes = array();
			$noCode = true;
		}
		// Substitute each code if more than one is given on one page
		while (list(, $theCode) = each($codes)) {
			$this->theCode = (string)strtoupper(trim($theCode)); // Get current code to global variable
			$this->thePid = $this->getFormUrlPid();
			switch ($this->theCode) {
				case 'TESTFORM':
					$content .= $this->displayTestForm();
				break;
				case 'SINGLE':
					list($t) = explode(':',$this->cObj->currentRecord);
					$this->internal['currentTable']=$t;
					$this->internal['currentRow']=$this->cObj->data;
					$content .= $this->pi_wrapInBaseClass($this->singleView($content,$conf));
				break;
				case 'LIST':
				default:
					if (strstr($this->cObj->currentRecord,'tt_content'))	{
						$conf['pidList'] = $this->cObj->data['pages'];
						$conf['recursive'] = $this->cObj->data['recursive'];
					}
					$content .= $this->pi_wrapInBaseClass($this->listView($content,$conf));
				break;
			}
		}
		if($noCode) {
			$content .= $this->displayHelp();
		}
		return $this->pi_wrapInBaseClass($content);
	}

Wichtig ist glaub ich wie du das fe_plugin definiert hast, weiss dazu aber auch nichts genaueres. Kenn grade mal den Unterschied zwischen USER (nicht gecached) und USER_INT (gecached) Objekt #paralyzed#

Ansonsten poste doch mal mehr infos aus deiner ext...

Gruß
Info

schnubby86 ·

ext_emconf.php:
$EM_CONF[$_EXTKEY] = Array (
'title' => 'EMail',
'description' => 'popemail',
'category' => 'plugin',
'author' => 'ich',
'author_email' => 'meine@email.de',
'shy' => '',
'dependencies' => 'cms',
'conflicts' => '',
'priority' => '',
'module' => '',
'state' => 'beta',
'internal' => '',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 1,
'lockType' => '',
'author_company' => '',
'private' => '',
'download_password' => '',
'version' => '0.0.0', // Don't modify this! Managed automatically during upload to repository.
'_md5_values_when_last_written' => 'a:5:{s:12:"ext_icon.gif";s:4:"1bdc";s:17:"ext_localconf.php";s:4:"2538";s:27:"pi1/class.user_popemail_pi1.php";s:4:"5125";s:19:"doc/wizard_form.dat";s:4:"c261";s:20:"doc/wizard_form.html";s:4:"c82d";}',
);

und die ext_localconf.php:

<?php
if (!defined ("TYPO3_MODE")) die ("Access denied.");

t3lib_extMgm::addPItoST43($_EXTKEY,"pi1/class.user_popemail_pi1.php","_pi1","includeLib",1);

?>

Da habe keine Fehler drin!!

Und mich würde es wundern, wenn ich im Typoscript setup meine Extension ansprechen müsste ausser mit subpart.BLA < plugin.popemail_pi1

Danke schonmal für deine Hilfe!!!! Ich werde es mal ausprobieren!

schnubby86 ·

So, ich habe mir jetzt den Ext editor geladen und damit eine neue Extension erstellt. Die laufen jetzt...

Danke nochmal für eure Hilfe!

Mfg Schnubby86