Newsletter subscribers change_status_at is NULL

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

 

I can’t figure out why newsletter subscribers are all ending up in the database with the change_status_at (datetime) field as NULL. Any ideas where I could look?

 

Check appcodecoreMageNewsletterModelMysql4Subscriber.php, public function received

 Signature 

55+ free & paid Magento extensions

 

I checked and see that this is included:

public function received(Mage_Newsletter_Model_Subscriber $subscriberMage_Newsletter_Model_Queue $queue)
    
{
        $this
->_write->beginTransaction();
         try 
{
             $data[
'letter_sent_at'now();
            
$this->_write->update($this->_subscriberLinkTable,
                                  
$data,
                                  array(
$this->_write->quoteInto('subscriber_id=?'$subscriber->getId()),
                                          
$this->_write->quoteInto('queue_id=?'$queue->getId())));
            
$this->_write->commit();
        
}
        
catch (Exception $e{
            $this
->_write->rollBack();
            
Mage::throwException(Mage::helper('newsletter')->__('Cannot mark as received subscriber.'));
        
}
        
return $this;
    
}

 

As you see there is no changes to the subscriber model. and there is no $subscriber->setChangeStstusAt(...) code in the module.  When you expect the status should be changed?  It seems to be a non used field.

 Signature 

55+ free & paid Magento extensions

 

I checked our other Magento store and it has the exact same code, but the database is being timestamped properly. So there must be something amiss somewhere else.

 

I also noticed, in the basic Magento installation (the store in which this functionality works properly), there are only three references to ‘change_status_at’:

appcodecoreMageNewsletterModelMysql4Subscriber.php
appcodecoreMageNewslettersqlnewsletter_setupmysql4-install-0.7.0.php
appcodecoreMageNewslettersqlnewsletter_setupmysql4-install-0.8.0.php

In the store, in which this is not working properly, we have all that existing code as well, but for some reason, it’s not populating the ‘change_status_at’ field with the proper timestamp. They all get entered with a NULL value.

 

I figured out that it was filled while I was running 1.3.2.4 and not filled now I am in 1.4.2.0 or 1.5.1.0

 Signature 

eBusiness Atlantique : Spécialiste en création de sites e-commerce Magento à La Rochelle.

Ambient Lounge : Fauteuils lounge pour l’intérieur et l’extérieur.

Billes de polystyrene.com : Billes de polystyrène pour garnissage de poufs ou fauteuils, isolation, neige artificielle, décors…

`Reply Or Comment!
Please LogIn to Reply!