Shop abgeschossen durch manuelles Löschen von Attributen in der Datenbank - HILFE!

Hi,

ich wollte gerne alte Attribute aus den Kategorie Attributen löschen und habe dummerweise direkt die Attribute in der SQL Datenbank gelöscht:

ALTER TABLE s_categories_attributes
DROP COLUMN my_einkaufsweltennachprodukten,
DROP COLUMN my_hidecategory,
DROP COLUMN my_category_internal_anchortext,
DROP COLUMN my_display_top,
DROP COLUMN my_name_top,
DROP COLUMN my_display_side,
DROP COLUMN my_name_side,
DROP COLUMN my_unfold_side

Zusätzlich habe ich die entsprechenden Zeilen für die Attribute in der Tabelle “s_attribute_configuration” gelöscht.

Jetzt habe ich den Shop abgeschossen, da weder das Backend noch das Frontend auf die Kategorien zugreifen kann. Das PDO
mag es anscheinend nicht, wenn man einfach die Attribute wegzieht.

Wenn ich im Backend versuche eine Kategorie zu editieren, erscheint diese Meldung:

503 - Service Unavailable
Ups! Ein Fehler ist aufgetreten! Die nachfolgenden Hinweise sollten Ihnen weiterhelfen. An exception occurred while executing 'SELECT s0_.sorting_ids AS sorting_ids_0, s0_.hide_sortings AS hide_sortings_1, s0_.facet_ids AS facet_ids_2, s0_.id AS id_3, s0_.parent AS parent_4, s0_.stream_id AS stream_id_5, s0_.description AS description_6, s0_.position AS position_7, s0_.meta_title AS meta_title_8, s0_.metakeywords AS metakeywords_9, s0_.metadescription AS metadescription_10, s0_.cmsheadline AS cmsheadline_11, s0_.cmstext AS cmstext_12, s0_.active AS active_13, s0_.template AS template_14, s0_.product_box_layout AS product_box_layout_15, s0_.blog AS blog_16, s0_.path AS path_17, s0_.external AS external_18, s0_.external_target AS external_target_19, s0_.hidefilter AS hidefilter_20, s0_.hidetop AS hidetop_21, s0_.changed AS changed_22, s0_.added AS added_23, s0_.mediaID AS mediaID_24, s1_.id AS id_25, s1_.categoryID AS categoryID_26, s1_.attribute1 AS attribute1_27, s1_.attribute2 AS attribute2_28, s1_.attribute3 AS attribute3_29, s1_.attribute4 AS attribute4_30, s1_.attribute5 AS attribute5_31, s1_.attribute6 AS attribute6_32, s1_.my_einkaufsweltennachprodukten AS my_einkaufsweltennachprodukten_33, s1_.my_hidecategory AS my_hidecategory_34, s1_.my_category_internal_anchortext AS my_category_internal_anchortext_35, s2_.show_listing AS show_listing_36, s2_.template_id AS template_id_37, s2_.id AS id_38, s2_.parent_id AS parent_id_39, s2_.active AS active_40, s2_.name AS name_41, s2_.userID AS userID_42, s2_.position AS position_43, s2_.device AS device_44, s2_.fullscreen AS fullscreen_45, s2_.valid_from AS valid_from_46, s2_.is_landingpage AS is_landingpage_47, s2_.seo_title AS seo_title_48, s2_.seo_keywords AS seo_keywords_49, s2_.seo_description AS seo_description_50, s2_.valid_to AS valid_to_51, s2_.create_date AS create_date_52, s2_.modified AS modified_53, s2_.`rows` AS rows_54, s2_.cols AS cols_55, s2_.cell_spacing AS cell_spacing_56, s2_.cell_height AS cell_height_57, s2_.article_height AS article_height_58, s2_.mode AS mode_59, s2_.preview_id AS preview_id_60, s2_.preview_secret AS preview_secret_61, s2_.customer_stream_ids AS customer_stream_ids_62, s2_.replacement AS replacement_63, s3_.id AS id_64, s3_.albumID AS albumID_65, s3_.name AS name_66, s3_.description AS description_67, s3_.path AS path_68, s3_.type AS type_69, s3_.extension AS extension_70, s3_.userID AS userID_71, s3_.created AS created_72, s3_.file_size AS file_size_73, s3_.width AS width_74, s3_.height AS height_75, s4_.id AS id_76, s4_.groupkey AS groupkey_77, s4_.description AS description_78, s4_.tax AS tax_79, s4_.taxinput AS taxinput_80, s4_.mode AS mode_81, s4_.discount AS discount_82, s4_.minimumorder AS minimumorder_83, s4_.minimumordersurcharge AS minimumordersurcharge_84 FROM s_categories s0_ LEFT JOIN s_categories_attributes s1_ ON s0_.id = s1_.categoryID LEFT JOIN s_emotion_categories s5_ ON s0_.id = s5_.category_id LEFT JOIN s_emotion s2_ ON s2_.id = s5_.emotion_id LEFT JOIN s_media s3_ ON s0_.mediaID = s3_.id LEFT JOIN s_categories_avoid_customergroups s6_ ON s0_.id = s6_.categoryID LEFT JOIN s_core_customergroups s4_ ON s4_.id = s6_.customergroupID WHERE s0_.id = ? AND s0_.id IN (?)' with params [509, "509"]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 's1_.my_einkaufsweltennachprodukten' in 'field list' in vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php on line 119 




Stack trace: #0 vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(836): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(PDOException), 'SELECT s0_.sort...', Array) #1 vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT s0_.sort...', Array, Array, NULL) #2 vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #3 vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(969): Doctrine\ORM\Query->_doExecute() #4 vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(924): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 2) #5 vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(727): Doctrine\ORM\AbstractQuery->execute(NULL, 2) #6 vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(165): Doctrine\ORM\AbstractQuery->getResult(2) #7 engine/Shopware/Controllers/Backend/Category.php(167): Doctrine\ORM\Tools\Pagination\Paginator->getIterator() #8 engine/Library/Enlight/Controller/Action.php(159): Shopware_Controllers_Backend_Category->getDetailAction() #9 engine/Library/Enlight/Controller/Dispatcher/Default.php(525): Enlight_Controller_Action->dispatch('getDetailAction') #10 engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #11 engine/Shopware/Kernel.php(184): Enlight_Controller_Front->dispatch() #12 vendor/symfony/http-kernel/HttpCache/HttpCache.php(491): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #14 vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #15 engine/Shopware/Components/HttpCache/AppCache.php(105): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) #16 shopware.php(118): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #17 {main}  

 

Ich habe die Datenbank nach den alten Attributnamen durchsucht, aber nichts mehr gefundenn.

Was kann ich tun, um den Shop noch zu retten? Ist zwar eine Entwicklungsinstallation, aber ich möchte nicht wieder von vorne anfangen.

Danke und viele Grüsse,

Jens

 

Problem gelöst:

Ich habe in der Commandline alle Caches ge-„cleared“:

sw cache:clear

Im Backend habe ich auch versucht, alle caches zu löschen, aber da hat es nicht funktioniert.
Wie kann man im Backend alle Caches löschen?

Danke und viele Grüsse,

Jens

Die Attribute-Models werden nur durch ein komplettes Cache-leeren per FTP/Shell oder per “sw:generate:attributes” neu erzeugt. In der Regel entfernt man die Spalten auch über das Backend, da wird das Model direkt von der Freitextfeld-Verwaltung neu erzeugt. Im Backend ist die Freitextfeld-Verwaltung der einzige Ort, wo man die Models erzeugen kann.

1 Like