Kriuchko
1/9/2019 - 9:59 AM

Errors problems

Magento 1 errors problems


\!h ----- wysiwyg dont save tag

http://stackoverflow.com/questions/5163518/magento-how-to-allow-certain-tags-iframe-embed-in-magentos-cms-editor


\!h ----- проблемы в админке не заходит в меню выбивает админка кеш cache

создай в корне магенты папку tmp с правами 777
[10:43:57] Пугач Алексей: потом в файле /lib/Zend/Cache/Backend/File.php
[10:44:17] Пугач Алексей: на 91 строке
[10:44:27] Пугач Алексей: замени

'cache_dir' => null, на 'cache_dir' => 'tmp/',


\!h ----- image upload problems

отключи хтаксесс
Установи плагин Dull Uploader
Если версия пхп 7 нужно поементь код в

lib/Varien/File/Uploader.php

$params['object']->$params['method']($this->_file['tmp_name']);
should be
$params['object']->{$params['method']}($this->_file['tmp_name']);


\!h ---- unknown cipher in list tlsv1

downloader/lib/Mage/HTTP/Client/Curl.php

if(isset($var)){
  $this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
}

After update to 1.9.3.1 Magento Connect Manager stopped getting upgrades.

When you check versions it adds an empty available versions column.

In /downloader/lib/Mage/HTTP/Client/Curl.php

curl_exec returns false and reports error: Unknown SSL protocol error in connection to connect20.magentocommerce.com:443

My (hosted) server returns:

OpenSSL/1.0.1t

it supports TLS 1.2 (according to https://www.howsmyssl.com/)

I changed

$this->curlOption(CURLOPT_SSLVERSION, 1); to $this->curlOption(CURLOPT_SSLVERSION, 6);

in file /downloader/lib/Mage/HTTP/Client/Curl.php function makeRequest ()
 
This solves the problem for me.


\!h ----- Invalid backend model specified: catalog/product_attribute_backend_startdate_specialprice не реиндексируется Product Prices

Связано с тем что кастомный модуль меняет в базе параметры.

Нужно запустить скрипт  

SELECT * FROM <database-name>.eav_attribute WHERE ( attribute_id LIKE '%special_price%' OR entity_type_id LIKE '%special_price%' OR attribute_code LIKE '%special_special_price%' OR attribute_model LIKE '%special_price%' OR backend_model LIKE '%special_price%' OR backend_type LIKE '%special_price%' OR backend_table LIKE '%special_price%' OR frontend_model LIKE '%special_price%' OR frontend_input LIKE '%special_price%' OR frontend_label LIKE '%special_price%' OR frontend_class LIKE '%special_price%' OR source_model LIKE '%special_price%' OR is_required LIKE '%special_price%' OR is_user_defined LIKE '%special_price%' OR default_value LIKE '%special_price%' OR is_unique LIKE '%special_price%' OR note LIKE '%special_price%' );

NOTE: Replace the with your magento DB.

You will find three rows in the database. Navigate to the column named as "Backend_model" and then you will see one of the entry written as

catalog/product_attribute_backend_startdate_specialprice

So, change the above entry to

catalog/product_attribute_backend_startdate



---------------------------------------

Service Temporarily Unavailable
503 The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. 
удали maintenance.flag в корне мадженты

------------------------------------------

 39 down vote accepted
    

I think there is the problem with session cookie with the chrome browser. So just go through this directory /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file and comment out the line from 85 to 92 in magento (1.7.2 for my case). Like this

    // session cookie params
   /* $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath(),
        'domain'   => $cookie->getConfigDomain(),
        'secure'   => $cookie->isSecure(),
        'httponly' => $cookie->getHttponly()
    );
  */

http://stackoverflow.com/questions/15491819/magento-admin-login-not-working-in-chrome-but-works-fine-for-firefox
http://mysillypointofview.richardferaro.com/2010/03/24/how-to-fix-magentos-admin-login-failing-no-error-message-on-localhost/

\!h ----- Не работает zoom responsive.css проверь

max width на img в дефолтных стилях мадженты
http://screen.w3.ua/Nov13/11256642.png

------------------------------------------

Magento : Solution for The PDO extension is required for this adapter but the extension is not loaded

Add this lines to your php.ini placed at the root of you installation

extension=pdo.so
extension=pdo_mysql.so
extension=php_pdo_mysql.dll

- See more at: http://www.magegurus.com/magento-solution-for-the-pdo-extension-is-required-for-this-adapter-but-the-extension-is-not-loaded/#sthash.GLEB4JsP.dpuf

-------------------------------------------

пример с зумом

<?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
    $sale = $_product->getAttributeText('sale');
?>
<div class="product-slideshow">
    <div class="slideset">
        <?php $i = 0; ?>
        <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
            <?php if (count($this->getGalleryImages()) > 0): ?>
                <?php $counter = 0; foreach ($this->getGalleryImages() as $_image): ++$counter; ?>
                    <div class="slide <?php if($counter == '1'){ echo ' active'; } ?>">
                        <div class="slide-holder">
                            <div class="slide-frame">
                                <?php if(!empty($sale) && strtolower($sale) != 'no'): ?>
                                    <span class="offer-box"><?php echo $this->__('sale!') ?></span>
                                <?php endif; ?>
                                <p class="product-image product-image-zoom">
                                    <img id="image<?php echo $i; ?>" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile()); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
                                </p>
                            </div>
                        </div>
                        <div class="zoom">
                            <img id="zoom_out-<?php print $i; ?>" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
                            <div class="track" id="track-<?php print $i; ?>">
                                <div class="handle" id="handle-<?php print $i; ?>"></div>
                            </div>
                            <img id="zoom_in-<?php print $i; ?>" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
                        </div>
                    </div>
                    <script type="text/javascript">
                    //<![CDATA[
                        Event.observe(window, 'load', function() {
                            product_zoom = new Product.Zoom('image<?php print $i; ?>', 'track-<?php print $i; ?>', 'handle-<?php print $i; ?>', 'zoom_in-<?php print $i; ?>', 'zoom_out-<?php print $i; ?>', 'track_hint');
                        });
                    //]]>
                    </script>
                   <?php $i++; ?>
                <?php endforeach; ?>
            <?php else: ?>
                <div class="slide active">
                    <div class="slide-holder">
                        <div class="slide-frame">
                            <?php if(!empty($sale) && strtolower($sale) != 'no'): ?>
                                <span class="offer-box"><?php echo $this->__('sale!') ?></span>
                            <?php endif; ?>
                            <a href="#" class="product-image product-image-zoom">
                                <?php
                                    $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(560,560).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
                                    echo $_helper->productAttribute($_product, $_img, 'image');
                                ?>
                            </a>
                        </div>   
                    </div>
                    <div class="zoom">
                       <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif'); ?>" alt="Zoom Out" title="Zoom Out" class="btn-zoom-out">
                       <div id="track">
                           <div class="handle" id="handle"></div>
                       </div>
                       <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif'); ?>" alt="Zoom In" title="Zoom In" class="btn-zoom-in">
                    </div>
                </div>
                <script type="text/javascript">
                //<![CDATA[
                    Event.observe(window, 'load', function() {
                        product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
                    });
                //]]>
                </script>
            <?php endif; ?>
        <?php else: ?>
            <div class="slide active">
                <div class="slide-holder">
                    <div class="slide-frame">
                        <?php if(!empty($sale) && strtolower($sale) != 'no'): ?>
                            <span class="offer-box"><?php echo $this->__('sale!') ?></span>
                        <?php endif; ?>
                        <a href="#" class="product-image product-image-zoom">
                            <?php
                                $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(560,560).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
                                echo $_helper->productAttribute($_product, $_img, 'image');
                            ?>
                        </a>
                    </div>   
                </div>
                <div class="zoom">
                   <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif'); ?>" alt="Zoom Out" title="Zoom Out" class="btn-zoom-out">
                   <div id="track">
                       <div class="handle" id="handle"></div>
                   </div>
                   <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif'); ?>" alt="Zoom In" title="Zoom In" class="btn-zoom-in">
                </div>
            </div>
            <script type="text/javascript">
            //<![CDATA[
                Event.observe(window, 'load', function() {
                    product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
                });
            //]]>
            </script>
        <?php endif; ?>
    </div>
    <?php if (count($this->getGalleryImages()) > 0): ?>
        <div class="pagination-block">
            <ul class="pagination">
                <?php foreach ($this->getGalleryImages() as $_image ):  ?>
                    <li><a href="#"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image', $_image->getFile())->resize(84,84); ?>" alt="<?php echo $_image->label; ?>" width="84" height="84" /></a></li>
                <?php endforeach;  ?>
            </ul>
        </div>
    <?php endif; ?>
</div>


\!h ----- Ajax problems product ajax problems click

Подключи <action method="addJs"><script>varien/product.js</script></action>
При навигации по продуктам следи что бы внизу в джеесе после формы добавлялись разные айдишники форм var productAddToCartForm = new VarienForm('product_addtocart_form');


\!h ----- cache_dir must be a directory

make a tmp dir in the root of the magento installation
that solved it for me 


\!h ----- Internal Server Error

http://www.snellmitchell.co/web/500-internal-server-errors-in-magento-community-common-causes/

500 Internal Server errors in Magento Community – common causes

Many users encounter Magento 500 Internal Server Errors (Error type 500) when they make updates to their site’s design or plugins without any significant experience, or just by computer error.  A majority of the errors we are asked about are common and the most common cause seems to be the Magento Downloader plugin (accessible via Magento Connect).

You should always try to take a look at your server’s error logs to get some help about this error before continuing.  You can get additional information about the errors by turning on ‘Developer Mode’.  Look in the Magento bootstrap file (index.php) using your FTP program and you’ll see lines similar to the following;

#Mage::setIsDeveloperMode(true);
 #ini_set(‘display_errors’, 1);

Uncomment these and save and update your PHP file.  In a production system, you would never want to have your errors display on the browser screen and to your users, but while you’re working on it, having errors and warnings thrown immediately in your face is invaluable in fixing the problem.  This way, you will see the actually problem which lead to the Internal Error Server.  In almost cases, the reason is that there is an exception throw after output is sent to browser.

What we’ve written here is only a guide, and we can’t take any responsibility for any problems it might cause you.  Always take a backup before updating or working with Magento!

 
Cause One: Permissions

This error might be caused because you have not set the correct permissions for the Magento folders.

To solve this go to File Manager and then change the file permission of the index.php file from 664 to 644.  Also change the permissions of the index.php file in the ‘downloader’ folder to 644 as well otherwise when you will try to access System > Magento Connect >Magento Connect Manager (reached after installation) by logging into the Magento admin dashboard,  you will get 500 Internal Server Error.

You can also try this tool, it’s a Magento Cleanup utility.  It will automatically set the correct permissions for your complete Magento installation, provided there is necessary administrative permission.

Download it here
Unzip the ZIP file to the root directory of your Magento installation
Browse to http://yourdomain.com/magento/magento-cleanup.php and let it work

\!h ----- magento connect unknown cipher

In file downloader/lib/Mage/HTTP/Client/Curl.php I changed the code

$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1'); 

to

if(isset($var)){

   $this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');

}


\!h ----- Can't login to admin, Invalid Form Key. Please refresh the page.

DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain';

DELETE FROM core_config_data WHERE path='web/cookie/cookie_path';

delete var/cache и var/session