Hallo,
ich habe hier ein TYPO3 6.1.1 mit Extbase 6.1.0.
Mein Model "Productgroup" hat eine Eigenschaft "parent", die wiederum vom selben Typ Productgroup ist. Der Extensionbuilder hat mir dies e Eigenschaft wie folgt angelegt (Ausschnitt):
namespace vendor\Myextension\Domain\Model;
/**
* parent
*
* @var \vendor\myextension\Domain\Model\Productgroup
*/
protected $parent;
/**
* Returns the parent
*
* @return \vendor\Myextension\Domain\Model\Productgroup $parent
*/
public function getParent() {
return $this->parent;
}
/**
* Sets the parent
*
* @param \vendor\Myextension\Domain\Model\Productgroup $parent
* @return void
*/
public function setParent(\vendor\Myextension\Domain\Model\Productgroup $parent) {
$this->parent = $parent;
}
Wenn ich nun eine Action aus dem ProductgroupController benutze, erhalte ich eine Fehlermeldung:
Uncaught TYPO3 Exception
#1264093630: Found an invalid element type declaration in %s. A type "'\\vendor\\Myextension\\Domain\\Model\\Productgroup'" does not exist.
Diesen Fehler konnte ich beheben, indem ich in der Model-Klasse den Datentyp für parent lokal angebe:
/**
* parent
*
* @var Productgroup
*/
protected $parent;
So weit, so gut. Wenn ich nun z.B. die Show-Action benutze, erhalte ich eine neue Fehlermeldung:
Uncaught TYPO3 Exception
Could not find class definition for name "Productgroup". This could be caused by a mis-spelling of the class name in the class definition.
Im Debug-Log stehen zuletzt folgende Aufrufe:
30 TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::buildDataMapInternal('Productgroup')
29 TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::buildDataMap('Productgroup')
28 TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::getDataMap('Productgroup')
27 TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory::create('Productgroup')
26 TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::getPreparedQuery(vendor\Myextension\Domain\Model\Productgroup, "parent", '0')
25 TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::getNonEmptyRelationValue(vendor\Myextension\Domain\Model\Productgroup, "parent", '0')
Edit: Wenn ich die Eigenschaft parent auskommentiere, funktioniert es einwandfrei.
Was muss ich wohl ändern, um mein Vorhaben fehlerfrei umzusetzen?
PS: Kann man irgendwie verhindern, dass Zeichenfolgen wie Anführungszeichen/Klammer -> ") automatisch zu Smileys konvertiert werden?