Cannot redeclare Shopware\Models\Attribute\Site::getId()

Fehler im Update auf 5.1.1 Fatal error: Cannot redeclare Shopware\Models\Attribute\Site::getId() in /…/services/www/html/var/cache/production_201510221322/doctrine/attributes/Site.php on line 72 Eine Prüfung der Datei zeigt schnell, dass sie tatsächlich fehlerhaft ist, die Funktionen getID und setID sind doppelt vorhanden: class Site extends ModelEntity { /\*\* \* @var integer $id \* @ORM\Id \* @ORM\GeneratedValue(strategy="IDENTITY") \* @ORM\Column(name="id", type="integer", nullable=false) \*/ protected $id; /\*\* \* @var integer $Id \* \* @ORM\Column(name="cmsStaticID", type="integer", nullable=true) \*/ protected $Id; public function getId() { return $this-\>id; } public function setId($id) { $this-\>id = $id; return $this; } public function getId() { return $this-\>id; } public function setId($id) { $this-\>id = $id; return $this; } public function get() { return $this-\>; } public function set($) { $this-\> = $; return $this; } } in 5.1.0 sah die Datei noch so aus: class Site extends ModelEntity { /\*\* \* @var integer $id \* @ORM\Id \* @ORM\GeneratedValue(strategy="IDENTITY") \* @ORM\Column(name="id", type="integer", nullable=false) \*/ protected $id; /\*\* \* @var integer $siteId \* \* @ORM\Column(name="cmsStaticID", type="integer", nullable=true) \*/ protected $siteId; /\*\* \* @var \Shopware\Models\Site\Site \* \* @ORM\OneToOne(targetEntity="Shopware\Models\Site\Site", inversedBy="attribute") \* @ORM\JoinColumns({ \* @ORM\JoinColumn(name="cmsStaticID", referencedColumnName="id") \* }) \*/ protected $site; public function getId() { return $this-\>id; } public function setId($id) { $this-\>id = $id; return $this; } public function getSiteId() { return $this-\>siteId; } public function setSiteId($siteId) { $this-\>siteId = $siteId; return $this; } public function getSite() { return $this-\>site; } public function setSite($site) { $this-\>site = $site; return $this; }

Hi, wahrscheinlich passen die Foreign Keys nicht bzw. sind doppelt. Führe einmal das aus: http://community.shopware.com/Foreign-K … l_954.html Beim Update wird der Model-Cache geleert. Das heißt aber nicht, dass das Update schuld ist. Gruß Heiner

1 „Gefällt mir“

Danke Herr Lohaus, genau das war es.