Ich habe ein Problem und stecke wirklich fest. Ich habe die meisten Antworten ausprobiert, aber nichts funktioniert.
Mein Problem:
Ich habe ein Magento 1.7.0.2 auf einen neuen Server übertragen.
Ich habe meiner Host-Datei die Zeilen hinzugefügt, um meine Eshop-Domain mit der neuen Server-IP anzuzeigen (Beispiel SERVER.IP www.mydomain.com).
Ich habe auf den Eshop zugegriffen und einige Fehler und Cache-Probleme behoben. Das einzige verbleibende Problem ist, dass wenn ich ein Produkt zum Warenkorb hinzufüge, es erfolgreich hinzugefügt wurde, aber dann jede Seite eine leere Seite ist.
Mein PHP-Speicherlimit beträgt 256 MB.
Ich habe keine php.ini im cpanel, ich habe nur die Standard-Magento .htaccess hinzugefügt. Wenn ich den .htaccess deaktiviere, erhalte ich 500 Fehler.
Ich habe mit diesen Tools überprüft: http://www.techjam.gr/techjamwp/wp-content/uploads/2012/04/magento-check.zip http://www.techjam.gr/techjamwp/wp-content /uploads/2012/04/magento-cleanup.zip Und alles scheint korrekt zu sein.
Ich habe in der index.php hinzugefügt
Fehlerberichterstattung (E_ALL & ~ E_NOTICE);
und ich erhalte überhaupt keine fehler nur leere seite.
Auch wenn ich den Entwicklermodus einschalte, erhalte ich Folgendes: Notice: Undefined index: themeData in /home/../public_html/app/design/frontend/default/../template/page/html/head.phtml on line 118
<?php
$config = Mage::getStoreConfig('mtcolinusadmin/mtcolinusadmin_appearance');
$otherconfig = Mage::getStoreConfig('mtcolinusadmin/otherconfig');
$sociallink = Mage::getStoreConfig('mtcolinusadmin/otherconfig/enabled_social_link');
?>
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
<title><?php echo $this->getTitle() ?></title>
<meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
<meta name="author" content="Andreadis Homestores" />
<meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
<?php if($config['theme_responsive']){?>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<?php }?>
<link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
//]]>
</script>
<![endif]-->
<?php echo $this->getCssJsHtml() ?>
<?php echo $this->getChildHtml() ?>
<?php echo $this->helper('core/js')->getTranslatorScript() ?>
<?php echo $this->getIncludes() ?>
<?php if($config['color_panel']){?>
<script src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'js/magenthemes/mt_colinus/js/mColorPicker.js';?>" type="text/javascript"></script>
<?php }?>
<script>
<?php if($otherconfig['enabled_compare']>0){?>
$mtkb('.mt-actions .link-compare').live('click', function () {
addCompare($mtkb(this), $mtkb(this).attr('href'), $mtkb(this).attr('data-id'));
return false;
});
$mtkb('#block-compare a.btn-remove').live('click', function () {
removeCompare($mtkb(this).attr('href'));
return false;
});
$mtkb('.top-compare a.btn-remove').live('click', function () {
removeCompare($mtkb(this).attr('href'));
return false;
});
$mtkb('#block-compare a.btn-remove-all').live('click', function () {
clearCompare($mtkb(this).attr('href'));
return false;
});
$mtkb('.top-compare a.btn-remove-all').live('click', function () {
clearCompare($mtkb(this).attr('href'));
return false;
});
<?php }?>
<?php if($otherconfig['enabled_wisthlist']>0){?>
$mtkb('.mt-actions .link-wishlist').live('click', function () {
addWishlist($mtkb(this), $mtkb(this).attr('href'),$mtkb(this).attr('data-id'));
return false;
});
$mtkb('#block-wisthlist a.btn-remove').live('click', function () {
removeWishlist($mtkb(this).attr('href'));
return false;
});
<?php }?>
<?php if($otherconfig['enabled_ajax']){?>
$mtkb(function($) {
$('.btn-cart').live('click', function () {
var cart = $('.top-cart');
var pass = true;
if($(this).parents("#block-related").length>0 || $(this).parents("#block-upsell").length>0){
var currentImg = $(this).parents('.content').find('a.product-image img');
}else{
if($(this).parents('.product-view').length>0){
var currentImg = $(this).parents('.product-view').find('a.cloud-zoom img');
}else{
var currentImg = $(this).parents('.content').find('a.product-image img');
}
}
if($(this).parents('.products-list-inner').length>0){
var eload = $(this).parents('.products-list-inner').find(".ajax-loading-list").show();
}else{
var eload = $(this).parents('.top-actions-inner').find(".ajax-loading").show();
}
<?php if(Mage::app()->getRequest()->getControllerName() == 'product' && Mage::app()->getRequest()->getActionName() == 'view') {?>
var qty = parseInt($('#qty').val());
if(!qty>0){
pass = false;
}
<?php }?>
if($('.quickview').length>0){
pass = false;
}
if (currentImg && pass) {
var imgclone = currentImg.clone()
.offset({ top:currentImg.offset().top, left:currentImg.offset().left })
.addClass('imgfly')
.css({'opacity':'0.7', 'position':'absolute', 'height':'180px', 'width':'180px', 'z-index':'1000'})
.appendTo($('body'))
.animate({
'top':cart.offset().top + 10,
'left':cart.offset().left + 10,
'width':55,
'height':55
}, 1000, 'easeInOutExpo');
imgclone.animate({'width':0, 'height':0});
}
return false;
});
});
<?php }?>
</script>
<?php
$themeData = Mage::helper('core')->jsonDecode($_COOKIE['themeData']);
$link_color = isset($themeData['linkColor']) ? $themeData['linkColor'] : $config['link_color'];
$link_hover_color = isset($themeData['linkHoverColor']) ? $themeData['linkHoverColor'] : $config['link_hover_color'];
$link_active_color = isset($themeData['linkActiveColor']) ? $themeData['linkActiveColor'] : $config['link_active_color'];
$text_color = isset($themeData['textColor']) ? $themeData['textColor'] : $config['text_color'];
$bg_color = isset($themeData['bodyColor']) ? $themeData['bodyColor'] : $config['bg_color'];
$body_pattern = isset($themeData['bodyPattern']) ? $themeData['bodyPattern'] : $config['pattern_body_select'];
$header_pattern = isset($themeData['headerPattern']) ? $themeData['headerPattern'] : $config['pattern_header_select'];
$top_pattern = isset($themeData['topPattern']) ? $themeData['topPattern'] : $config['pattern_top_select'];
$pattern_copyright = isset($themeData['patternCopyright']) ? $themeData['patternCopyright'] : $config['pattern_copyright_select'];
$footer_pattern = isset($themeData['footerPattern']) ? $themeData['footerPattern'] : $config['pattern_footer_select'];
$header_bg_color = isset($themeData['HeaderbgColor']) ? $themeData['HeaderbgColor'] : $config['header_bg_color'];
$header_link_color = isset($themeData['HeaderlinkColor']) ? $themeData['HeaderlinkColor'] : $config['header_link_color'];
$header_link_hover_color = isset($themeData['HeaderlinkHoverColor']) ? $themeData['HeaderlinkHoverColor'] : $config['header_link_hover_color'];
$header_link_active_color = isset($themeData['HeaderlinkActiveColor']) ? $themeData['HeaderlinkActiveColor'] : $config['header_link_active_color'];
$header_text_color = isset($themeData['HeadertextColor']) ? $themeData['HeadertextColor'] : $config['header_text_color'];
$top_bg_color = isset($themeData['TopbgColor']) ? $themeData['TopbgColor'] : $config['top_bg_color'];
$top_bg_hover_color = isset($themeData['TopbgHoverColor']) ? $themeData['TopbgHoverColor'] : $config['top_bg_hover_color'];
$top_link_color = isset($themeData['ToplinkColor']) ? $themeData['ToplinkColor'] : $config['top_link_color'];
$top_link_hover_color = isset($themeData['ToplinkHoverColor']) ? $themeData['ToplinkHoverColor'] : $config['top_link_hover_color'];
$top_link_active_color = isset($themeData['ToplinkActiveColor']) ? $themeData['ToplinkActiveColor'] : $config['top_link_active_color'];
$top_text_color = isset($themeData['ToptextColor']) ? $themeData['ToptextColor'] : $config['top_text_color'];
$icons_bg_color = isset($themeData['IconsbgColor']) ? $themeData['IconsbgColor'] : $config['icons_bg_color'];
$icons_bg_hover_color = isset($themeData['IconsbgHoverColor']) ? $themeData['IconsbgHoverColor'] : $config['icons_bg_hover_color'];
$buttons_bg_color = isset($themeData['ButtonsbgColor']) ? $themeData['ButtonsbgColor'] : $config['buttons_bg_color'];
$buttons_bg_hover_color = isset($themeData['ButtonsbgHoverColor']) ? $themeData['ButtonsbgHoverColor'] : $config['buttons_bg_hover_color'];
$buttons_text_color = isset($themeData['ButtonstextColor']) ? $themeData['ButtonstextColor'] : $config['buttons_text_color'];
$buttons_text_hover_color = isset($themeData['ButtonstextHoverColor']) ? $themeData['ButtonstextHoverColor'] : $config['buttons_text_hover_color'];
$addtocart_bg_color = isset($themeData['AddtocartbgColor']) ? $themeData['AddtocartbgColor'] : $config['addtocart_bg_color'];
$addtocart_bg_hover_color = isset($themeData['AddtocartbgHoverColor']) ? $themeData['AddtocartbgHoverColor'] : $config['addtocart_bg_hover_color'];
$mainmenu_bg_color = isset($themeData['MainmenubgColor']) ? $themeData['MainmenubgColor'] : $config['mainmenu_bg_color'];
$mainmenu_dropdown_bg_color = isset($themeData['MainmenubgDropDownColor']) ? $themeData['MainmenubgDropDownColor'] : $config['mainmenu_dropdown_bg_color'];
$mainmenu_bg_hover_color = isset($themeData['MainmenubgHoverColor']) ? $themeData['MainmenubgHoverColor'] : $config['mainmenu_bg_hover_color'];
$mainmenu_bg_active_color = isset($themeData['MainmenubgActiveColor']) ? $themeData['MainmenubgActiveColor'] : $config['mainmenu_bg_active_color'];
$mainmenu_link_color = isset($themeData['MainmenulinkColor']) ? $themeData['MainmenulinkColor'] : $config['mainmenu_link_color'];
$mainmenu_link_hover_color = isset($themeData['MainmenulinkHoverColor']) ? $themeData['MainmenulinkHoverColor'] : $config['mainmenu_link_hover_color'];
$mainmenu_link_active_color = isset($themeData['MainmenulinkActiveColor']) ? $themeData['MainmenulinkActiveColor'] : $config['mainmenu_link_active_color'];
$mainmenu_link_sub_hover_color = isset($themeData['MainmenulinkSubHoverColor']) ? $themeData['MainmenulinkSubHoverColor'] : $config['mainmenu_link_sub_hover_color'];
$mainmenu_text_color = isset($themeData['MainmenutextColor']) ? $themeData['MainmenutextColor'] : $config['mainmenu_text_color'];
$copyright_bg_color = isset($themeData['CopyrightbgColor']) ? $themeData['CopyrightbgColor'] : $config['copyright_bg_color'];
$copyright_text_color = isset($themeData['CopyrighttextColor']) ? $themeData['CopyrighttextColor'] : $config['copyright_text_color'];
$copyright_link_color = isset($themeData['CopyrightlinkColor']) ? $themeData['CopyrightlinkColor'] : $config['copyright_link_color'];
$copyright_link_hover_color = isset($themeData['CopyrightlinkHoverColor']) ? $themeData['CopyrightlinkHoverColor'] : $config['copyright_link_hover_color'];
$copyright_link_active_color = isset($themeData['CopyrightlinkActiveColor']) ? $themeData['CopyrightlinkActiveColor'] : $config['copyright_link_active_color'];
$footer_static_bg_color = isset($themeData['footer_static_bg_color']) ? $themeData['footer_static_bg_color'] : $config['footer_static_bg_color'];
$footer_static_text_color = isset($themeData['footer_static_text_color']) ? $themeData['footer_static_text_color'] :$config['footer_static_text_color'];
$footer_static_link_color = isset($themeData['footer_static_link_color']) ? $themeData['footer_static_link_color'] :$config['footer_static_link_color'];
$footer_static_link_hover_color = isset($themeData['footer_static_link_hover_color']) ? $themeData['footer_static_link_hover_color'] :$config['footer_static_link_hover_color'];
$footer_static_link_active_color = isset($themeData['footer_static_link_active_color']) ? $themeData['footer_static_link_active_color'] :$config['footer_static_link_active_color'];
$bfont = isset($themeData['b_font']) ? $themeData['b_font'] : $config['b_font'];
$headerfont = isset($themeData['header_font']) ? $themeData['header_font'] : $config['header_font'];
$mfont = isset($themeData['m_font']) ? $themeData['m_font'] : $config['m_font'];
$maintopfont = isset($themeData['maintop_font']) ? $themeData['maintop_font'] : $config['maintop_font'];
$footerfont = isset($themeData['footer_font']) ? $themeData['footer_font'] : $config['footer_font'];
$copyrightfont = isset($themeData['copyright_font']) ? $themeData['copyright_font'] : $config['copyright_font'];
$themestyles = isset($themeData['theme_styles']) ? $themeData['theme_styles'] : $config['theme_styles'];
?>
Könnte dieser Fehler darauf zurückzuführen sein, dass versucht wurde, von der IP aus auf den Magento-Eshop zuzugreifen (da ich es bin, über die Host-Datei)?
quelle
Antworten:
Wenn Sie das gleiche Problem hatten, wenden Sie sich an den Host und fragen Sie ihn, wie hoch das für das Konto festgelegte Speicherlimit ist. In meinem Fall war es auf niedrig eingestellt, also hatte es, egal was ich für den phpmemory eingestellt hatte, immer noch ein niedrigeres Speicherlimit.
quelle
Sie haben stripped head.phtml gepostet. Bitte posten Sie die genaue Zeile 118, die Folgendes enthält:
jsonDecode($_COOKIE['themeData']);
Wenn es so etwas gibt:
$themeData = jsonDecode($_COOKIE['themeData']);
Ersetzen Sie es durch Folgendes:$themeData = isset($_COOKIE['themeData']) ? jsonDecode($_COOKIE['themeData']) : array();
quelle