Wieder mal Update - kaputt statt up2date

Hallo,

während der eine Test-Shop seine Updates macht, will der andere nicht so recht.

Auf 5.16 ging es noch irgendwie, aber weiter dann nicht mehr.

Im backend sind alle Plugins und Vorraussetzungen erfüllt, die Migration und das Datenbankupdate werden durchgeführt. Dann noch Saubermachen und alles ist kaputt :frowning: (Fehlermeldung siehe unten)

Kann mir jemand helfen das Problem zu lösen?

Ich mache das Update gerne nochmal um Details des slim application errors einstellen zu können.

Danke!

Was genau bedeutet denn „und alles ist kaputt“?

Liegt es eventuell an unzureichendem freiem Speicherplatz?

Viele Grüße,
Florian

Hallo Florian,

ich komme dann nicht mehr aus dem Wartungsmodus heraus. Weder komme ich ins Frontend noch ins Backend.

Auf dem Server sind noch ca. 7 GB freier Speicherplatz

Viele Grüße,

Christoph

Wenn du im Verzeichnis files/updates/ die Datei update.json löscht dann kannst du wieder auf den Shop/Backend zugreifen.

 

ACHTUNG: Ohne Gewähr, welche weiteren Auswirkungen das Löschen der update.json hat. Eventuell äussert sich Shopware dazu.

1 „Gefällt mir“

@MSH schrieb:

Wenn du im Verzeichnis files/updates/ die Datei update.json löscht dann kannst du wieder auf den Shop/Backend zugreifen.

 

ACHTUNG: Ohne Gewähr, welche weiteren Auswirkungen das Löschen der update.json hat. Eventuell äussert sich Shopware dazu.

Das würde ich auf jeden Fall probieren.

Wäre natürlich toll, wenn sich die Jungs von Shopware dazu äußern würden!

Ich habs noch mal gemacht …

Slim Application Error

The application could not run because of the following error:

Details
Type: Doctrine\ORM\Mapping\MappingException
Message: No mapping found for field 'customerGroup' on class 'Shopware\Models\Attribute\CustomerGroup'.
File: /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php
Line: 163

Trace


#0 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(1238): Doctrine\ORM\Mapping\MappingException::mappingNotFound('Shopware\\Models...', 'customerGroup')
#1 /var/www/virtual/wo/html/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(802): Doctrine\ORM\Mapping\ClassMetadataInfo->getAssociationMapping('customerGroup')
#2 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(2626): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadOneToOneEntity(Array, Object(Shopware\Models\Customer\Group))
#3 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(273): Doctrine\ORM\UnitOfWork->createEntity('Shopware\\Models...', Array, Array)
#4 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(437): Doctrine\ORM\Internal\Hydration\ObjectHydrator->getEntity(Array, 'customerGroup')
#5 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(165): Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateRowData(Array, Array)
#6 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php(147): Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateAllData()
#7 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(978): Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll(Object(PDOStatement), Object(Doctrine\ORM\Query\ResultSetMapping), Array)
#8 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(924): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, NULL)
#9 /var/www/virtual/wo/html/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(766): Doctrine\ORM\AbstractQuery->execute(NULL, NULL)
#10 /var/www/virtual/wo/html/engine/Shopware/Models/Shop/Repository.php(306): Doctrine\ORM\AbstractQuery->getOneOrNullResult()
#11 /var/www/virtual/wo/html/engine/Shopware/Bundle/MediaBundle/MediaService.php(224): Shopware\Models\Shop\Repository->getActiveDefault()
#12 /var/www/virtual/wo/html/engine/Shopware/Bundle/MediaBundle/MediaService.php(81): Shopware\Bundle\MediaBundle\MediaService->createFallbackMediaUrl()
#13 /var/www/virtual/wo/html/engine/Shopware/Bundle/MediaBundle/MediaServiceFactory.php(81): Shopware\Bundle\MediaBundle\MediaService->__construct(Object(League\Flysystem\Filesystem), Object(Shopware\Bundle\MediaBundle\Strategy\Md5Strategy), Object(ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer), Array)
#14 /var/www/virtual/wo/html/var/cache/production_201611151410/proxies/ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer.php(1107): Shopware\Bundle\MediaBundle\MediaServiceFactory->factory('local')
#15 /var/www/virtual/wo/html/vendor/symfony/dependency-injection/Container.php(314): ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer->getShopwareMedia_MediaServiceService()
#16 /var/www/virtual/wo/html/engine/Shopware/Components/DependencyInjection/Container.php(182): Symfony\Component\DependencyInjection\Container->get('shopware_media....', 1)
#17 /var/www/virtual/wo/html/engine/Shopware/Components/DependencyInjection/Container.php(138): Shopware\Components\DependencyInjection\Container->doLoad('shopware_media....', 1)
#18 /var/www/virtual/wo/html/var/cache/production_201611151410/proxies/ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer.php(1739): Shopware\Components\DependencyInjection\Container->get('shopware_media....')
#19 /var/www/virtual/wo/html/vendor/symfony/dependency-injection/Container.php(314): ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer->getThemeServiceService()
#20 /var/www/virtual/wo/html/engine/Shopware/Components/DependencyInjection/Container.php(182): Symfony\Component\DependencyInjection\Container->get('theme_service', 1)
#21 /var/www/virtual/wo/html/engine/Shopware/Components/DependencyInjection/Container.php(138): Shopware\Components\DependencyInjection\Container->doLoad('theme_service', 1)
#22 /var/www/virtual/wo/html/var/cache/production_201611151410/proxies/ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer.php(1731): Shopware\Components\DependencyInjection\Container->get('theme_service')
#23 /var/www/virtual/wo/html/vendor/symfony/dependency-injection/Container.php(314): ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer->getThemeInstallerService()
#24 /var/www/virtual/wo/html/engine/Shopware/Components/DependencyInjection/Container.php(182): Symfony\Component\DependencyInjection\Container->get('theme_installer', 1)
#25 /var/www/virtual/wo/html/engine/Shopware/Components/DependencyInjection/Container.php(138): Shopware\Components\DependencyInjection\Container->doLoad('theme_installer', 1)
#26 /var/www/virtual/wo/html/recovery/update/src/DependencyInjection/Container.php(187): Shopware\Components\DependencyInjection\Container->get('theme_installer')
#27 /var/www/virtual/wo/html/recovery/common/vendor/pimple/pimple/src/Pimple/Container.php(113): Shopware\Recovery\Update\DependencyInjection\Container->Shopware\Recovery\Update\DependencyInjection\{closure}(Object(Pimple\Container))
#28 /var/www/virtual/wo/html/recovery/common/src/DependencyInjection/Container.php(80): Pimple\Container->offsetGet('shopware.theme_...')
#29 /var/www/virtual/wo/html/recovery/update/src/app.php(164): Shopware\Recovery\Common\DependencyInjection\Container->get('shopware.theme_...')
#30 [internal function]: {closure}()
#31 /var/www/virtual/wo/html/recovery/common/vendor/slim/slim/Slim/Route.php(462): call_user_func_array(Object(Closure), Array)
#32 /var/www/virtual/wo/html/recovery/common/vendor/slim/slim/Slim/Slim.php(1326): Slim\Route->dispatch()
#33 /var/www/virtual/wo/html/recovery/common/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#34 /var/www/virtual/wo/html/recovery/common/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#35 /var/www/virtual/wo/html/recovery/common/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#36 /var/www/virtual/wo/html/recovery/common/vendor/slim/slim/Slim/Slim.php(1271): Slim\Middleware\PrettyExceptions->call()
#37 /var/www/virtual/wo/html/recovery/update/index.php(46): Slim\Slim->run()
#38 {main}

Hat das vlt. etwas mit der “Foreign Keys” Problematik zu tun?

Beim ersten Mal ist das Update bis auf das Löschen der nicht mehr benötigten Dateien durchgelaufen oder?

Es läuft immer durch, nur dass am Ende nach dem Löschen der nicht mehr benötigten Dateien dann die Fehlermeldung erscheint und der Shop im Wartungsmodus verharrt.

 

Ich spiele dann immer das Backup und den Datenbankdump ein weil ich keine Lösung habe

Hast du mal die update.json gelöscht?

ja, jetzt kommt ein 503 service unavailable

Foreign Key Reparatur durchgeführt und danach den Cahe-Ordner auf dem Server direkt leer gemacht?

Danach noch Update durchlaufen lassen.

Hallo Moritz,

in der Reihenfolge?

  • Backup Daten
  • Backup Datenbank
  • Foreign Key Reparatur
  • rm -rf var/cache/*
  • Update über Backend
  • sh var/cache/clear_cache.sh

Das Cache leeren am Ende brauchst du garnicht, da das der Updater selbst macht, wenn die Zugriffsrechte auf dem Server passen. Sonst kannst du das so machen.

Ich habe in Adminer (leider kein PHPmyadmin verfügbar) die Datei importiert. Leider gibt es Fehler:

-- Add missing foreign key
ALTER TABLE `s_categories_attributes` ADD FOREIGN KEY ( `categoryID` ) REFERENCES `s_categories` (
        `id`
) ON DELETE CASCADE ON UPDATE NO ACTION

Error in query (1452): Cannot add or update a child row: a foreign key constraint fails (wo_shopware5.#sql-4983_b7e7a4, CONSTRAINT #sql-4983_b7e7a4_ibfk_1 FOREIGN KEY (categoryID) REFERENCES s_categories (id) ON DELETE CASCADE ON UPDATE NO ACTION)

leider keine Änderung - alles kaputt

Das Querry-Ergebnis zeigt ja schon, dass deine DB einen Fehler hat. Natürlich ändert sich nichts, wenn das Querry schon einen Fehler zurückgibt.

Dein Fehler steht aber sogar im Wiki-Artikel dazu und auch, was du dann machen musst: http://community.shopware.com/Foreign-Keys-reparieren_detail_954.html#...CONSTRAINT_FAILED…_FOREIGN_KEY_.28.60categoryID.60.29…

DELETE ca -- SELECT ca.*
FROM `s_categories_attributes` ca 
LEFT JOIN s_categories c
ON c.id = ca.categoryID 
WHERE c.id IS NULL

Danach nochmal die Foreign-Key Reparatur durchführen, bis die durchläuft.

Query executed OK, 2 rows affected.

Ich bin gerade an s_order_basket dran

Es funktioniert :slight_smile:

Wie cool !!!

Ich habe schon gar nicht mehr damit gerechnet …

 

Ich danke euch für die Unterstützung!

 

PS[@Moritz Naczenski](http://forum.shopware.com/profile/14574/Moritz Naczenski “Moritz Naczenski”)‍ Ich habe gerade entdeckt, wo du das s_categories entdeckt hast. Vielleicht kann ich mir nächstes mal schon selber helfen