{"id":701,"date":"2018-08-11T14:24:41","date_gmt":"2018-08-11T12:24:41","guid":{"rendered":"https:\/\/www.milkycode.com\/?p=701"},"modified":"2025-03-03T17:42:02","modified_gmt":"2025-03-03T16:42:02","slug":"recoverable-error-argument-1-passed-to-mage_core_model_storesetwebsite-must-be-an-instance-of-mage_core_model_website-null-given","status":"publish","type":"post","link":"https:\/\/www.milkycode.com\/de\/recoverable-error-argument-1-passed-to-mage_core_model_storesetwebsite-must-be-an-instance-of-mage_core_model_website-null-given\/","title":{"rendered":"Recoverable Error: Argument 1 passed to Mage_Core_Model Store"},"content":{"rendered":"<p>Die Fehlermeldung<\/p>\n<h2 style=\"font-size: 14px;\">Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given<\/h2>\n<p>in Magento passiert \u00e4u\u00dfert selten und nur unter bestimmten Umst\u00e4nden. Die Ursache daf\u00fcr ist aber nur sehr schwer zu finden und nachzuvollziehen.<\/p>\n<p>Es ist bei einem Kunden mal aufgetreten, wobei niemand wei\u00df, wie das passieren konnte. Ursache ist, dass sich die Admin-Store-IDs ge\u00e4ndert haben, was ja normal nicht passiert.<\/p>\n<p>Um den Fehler zu beheben muss man diese nun einfach per SQL-Befehl zur\u00fccksetzen:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">SET FOREIGN_KEY_CHECKS=0;\r\nUPDATE `core_store` SET store_id = 0 WHERE code=&quot;admin&quot;;\r\nUPDATE `core_store_group` SET group_id = 0 WHERE name=&quot;Default&quot;;\r\nUPDATE `core_website` SET website_id = 0 WHERE code=&quot;admin&quot;;\r\nUPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code=&quot;NOT LOGGED IN&quot;;\r\nSET FOREIGN_KEY_CHECKS=1;\r\n<\/pre>\n<p>Danach wie \u00fcblich ggf. den Cache leeren.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die Fehlermeldung Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given in Magento passiert \u00e4u\u00dfert selten und nur unter bestimmten Umst\u00e4nden. Die Ursache daf\u00fcr ist aber nur sehr schwer zu finden und nachzuvollziehen. Es ist bei einem Kunden mal aufgetreten, wobei niemand wei\u00df, wie das passieren konnte. Ursache ist, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1570,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[42,3],"class_list":["post-701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento-1","tag-fehler","tag-magento-1"],"featured_image_src":{"landsacpe":["https:\/\/www.milkycode.com\/wp-content\/uploads\/2025\/03\/Magento-Error-1140x445.jpg",1140,445,true],"list":["https:\/\/www.milkycode.com\/wp-content\/uploads\/2025\/03\/Magento-Error-463x348.jpg",463,348,true],"medium":["https:\/\/www.milkycode.com\/wp-content\/uploads\/2025\/03\/Magento-Error-300x193.jpg",300,193,true],"full":["https:\/\/www.milkycode.com\/wp-content\/uploads\/2025\/03\/Magento-Error.jpg",1340,862,false]},"_links":{"self":[{"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":10,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":1590,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/posts\/701\/revisions\/1590"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/media\/1570"}],"wp:attachment":[{"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milkycode.com\/de\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}