Buongiorno a tutti, ho un problema con Magento.

Ho un'installazione sul server che funziona bene, e ho provato a farne una copia in locale per far qualche esperimento. Copiate cartelle, file nascosti e database, in locale il front end funziona, mentre al backend non riesco ad accedere.

L'errore che mi dà all'apertura della pagina /admin è:

Fatal error: Call to a member function hasSyncProcessStopWatch() on a non-object in C:\easyphp\www\NOMEDELSITO\app\code\core\Mage\Core \Model\Observer.php on line 46

Più sotto riporto il codice della pagina. Visto che online funziona e offline no, mi basterebbe che qualcuno mi indicasse come bypassare il problema, "piallando" l'eventuale controllo che magento fa con questa classe e obbligandola in qualche modo a dare sempre esito positivo.

Qualunque consiglio o segnalazione sono bene accetti.

Grazie in anticipo,

Stefano

Codice PHP:

/**
 * Core Observer model
 *
 * @category   Mage
 * @package    Mage_Core
 * @author     Magento Core Team <core@magentocommerce.com>
 */
class Mage_Core_Model_Observer
{
    
/**
     * Check if synchronize process is finished and generate notification message
     *
     * @param  Varien_Event_Observer $observer
     * @return Mage_Core_Model_Observer
     */
    
public function addSynchronizeNotification(Varien_Event_Observer $observer)
    {
        
$adminSession Mage::getSingleton('admin/session');
        if (!
$adminSession->hasSyncProcessStopWatch()) {
            
$flag Mage::getSingleton('core/file_storage')->getSyncFlag();
            
$state $flag->getState();
            if (
$state == Mage_Core_Model_File_Storage_Flag::STATE_RUNNING) {
                
$syncProcessStopWatch true;
            } else {
                
$syncProcessStopWatch false;
            }

            
$adminSession->setSyncProcessStopWatch($syncProcessStopWatch);
        }
        
$adminSession->setSyncProcessStopWatch(false);

        if (!
$adminSession->getSyncProcessStopWatch()) {
            if (!isset(
$flag)) {
                
$flag Mage::getSingleton('core/file_storage')->getSyncFlag();
            }

            
$state $flag->getState();
            if (
$state == Mage_Core_Model_File_Storage_Flag::STATE_FINISHED) {
                
$flagData $flag->getFlagData();
                if (isset(
$flagData['has_errors']) && $flagData['has_errors']) {
                    
$severity       Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR;
                    
$title          Mage::helper('adminhtml')->__('An error has occured while syncronizing media storages.');
                    
$description    Mage::helper('adminhtml')->__('One or more media files failed to be synchronized during the media storages syncronization process. Refer to the log file for details.');
                } else {
                    
$severity       Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE;
                    
$title          Mage::helper('adminhtml')->__('Media storages synchronization has completed!');
                    
$description    Mage::helper('adminhtml')->__('Synchronization of media storages has been successfully completed.');
                }

                
$date date('Y-m-d H:i:s');
                
Mage::getModel('adminnotification/inbox')->parse(array(
                    array(
                        
'severity'      => $severity,
                        
'date_added'    => $date,
                        
'title'         => $title,
                        
'description'   => $description,
                        
'url'           => '',
                        
'internal'      => true
                    
)
                ));

                
$flag->setState(Mage_Core_Model_File_Storage_Flag::STATE_NOTIFIED)->save();
            }

            
$adminSession->setSyncProcessStopWatch(false);
        }

        return 
$this;
    }

    
/**
     * Cron job method to clean old cache resources
     *
     * @param Mage_Cron_Model_Schedule $schedule
     */
    
public function cleanCache(Mage_Cron_Model_Schedule $schedule)
    {
        
Mage::app()->getCache()->clean(Zend_Cache::CLEANING_MODE_OLD);
        
Mage::dispatchEvent('core_clean_cache');
    }