Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Issue #23699 | Newsletter Error in 1.4.1.0 - Possible Hotfix
 
borriglione_le
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2009-02-16
 

http://www.magentocommerce.com/bug-tracking/issue?issue=9555

I added a newsletter template and saved it. (see file newsletter_template.jpg) And when I choose “Queue Newsletter” from the list, in the next page the body of the newsletter is empty. (see file newsletter_queue.jpg) I created a few templates but all acted the same.

Addition to this, when I had two templates, I opened one of them to edit but it kept showing the body of the other one. It really confused me so I don’t remember well but I think it kept mixing up with the one to another. I opened template A and it showed B in the textarea.

I created a small hotfix (no warranty) wink

Block: Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form
Line: 131-163

Replace

if (in_array($queue->getQueueStatus(), array(
                
Mage_Newsletter_Model_Queue::STATUS_NEVER,
                
Mage_Newsletter_Model_Queue::STATUS_PAUSE))) {

            $widgetFilters 
= array('is_email_compatible' => 1);
            
$wysiwygConfig Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
            if (
$queue->getTemplate()->isPlain()) {
                $wysiwygConfig
->setEnabled(false);
            
}
            $fieldset
->addField('text','editor', array(
                
'name'      => 'text',
                
'label'     => Mage::helper('newsletter')->__('Message'),
                
'state'     => 'html',
                
'required'  => true,
                
'value'     => $queue->getTemplate()->getTemplateTextPreprocessed(),
                
'style'     => 'width:98%; height: 600px;',
                
'config'    => $wysiwygConfig
            
));
        
else {
            $fieldset
->addField('text','text', array(
                
'name'      =>    'text',
                
'label'     =>    Mage::helper('newsletter')->__('Message'),
                
'value'     =>    $this->getUrl('*/newsletter_template/preview',  array(
                                     
'id' => $queue->getTemplate()->getId()
                                  ))
            ));

            
$form->getElement('text')->setRenderer(Mage::getModel('adminhtml/newsletter_renderer_text'));
            
$form->getElement('subject')->setDisabled('true');
            
$form->getElement('sender_name')->setDisabled('true');
            
$form->getElement('sender_email')->setDisabled('true');
            
$form->getElement('stores')->setDisabled('true');
        
}

with:

if (in_array($queue->getQueueStatus(), array(
                
Mage_Newsletter_Model_Queue::STATUS_NEVER,
                
Mage_Newsletter_Model_Queue::STATUS_PAUSE)) && $queue->getQueueStatus()!=""{

            $widgetFilters 
= array('is_email_compatible' => 1);
            
$wysiwygConfig Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
            if (
$queue->getTemplate()->isPlain()) {
                $wysiwygConfig
->setEnabled(false);
            
}
            $fieldset
->addField('text','editor', array(
                
'name'      => 'text',
                
'label'     => Mage::helper('newsletter')->__('Message'),
                
'state'     => 'html',
                
'required'  => true,
                
'value'     => $queue->getTemplate()->getTemplateTextPreprocessed(),
                
'style'     => 'width:98%; height: 600px;',
                
'config'    => $wysiwygConfig
            
));
        
else {
            $widgetFilters 
= array('is_email_compatible' => 1);
            
$wysiwygConfig Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
            if (
$queue->getTemplate()->isPlain()) {
                $wysiwygConfig
->setEnabled(false);
            
}        
        
            $fieldset
->addField('text','editor', array(
                
'name'      => 'text',
                
'label'     => Mage::helper('newsletter')->__('Message'),
                
'state'     => 'html',
                
'required'  => true,
                
'value'     => $queue->getTemplate()->getTemplateText(),
                
'style'     => 'width:98%; height: 600px;',
                
'config'    => $wysiwygConfig
            
));
        
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
fawx
Jr. Member
 
Total Posts:  6
Joined:  2010-06-24
 

awesome.

 
Magento Community Magento Community
Magento Community
Magento Community
 
AppliBox
Member
 
Avatar
Total Posts:  61
Joined:  2010-04-12
France
 

Same problem with Magento 1.4.1.1 !
I will try your fix!

EDIT : your fix works in Magento 1.4.1.1 ! Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan jones
Member
 
Total Posts:  37
Joined:  2010-02-11
 

*sigh* another bug I see.

I wrote a quick extension for people who don’t really want to go and edit code and what not. Just drop the file in the link into the Magento webroot and extract, and watch the problem mysteriously vanish!

Dan

Link: BTS_NewsletterFix.tar.gz

 
Magento Community Magento Community
Magento Community
Magento Community
 
sascha_egerer
Jr. Member
 
Total Posts:  1
Joined:  2008-12-27
 

I think your fix is not correct.
I’ve fixed this like this:

if($queue->getQueueStatus() == ''{
            $widgetFilters 
= array('is_email_compatible' => 1);
            
$wysiwygConfig Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
            if (
$queue->getTemplate()->isPlain()) {
                $wysiwygConfig
->setEnabled(false);
            
}
            $fieldset
->addField('text','editor', array(
                
'name'      => 'text',
                
'label'     => Mage::helper('newsletter')->__('Message'),
                
'state'     => 'html',
                
'required'  => true,
                
'value'     => $queue->getTemplate()->getTemplateText(),
                
'style'     => 'width:98%; height: 600px;',
                
'config'    => $wysiwygConfig
            
));
        
elseif (in_array($queue->getQueueStatus(), array(
                
Mage_Newsletter_Model_Queue::STATUS_NEVER,
                
Mage_Newsletter_Model_Queue::STATUS_PAUSE))) {

            $widgetFilters 
= array('is_email_compatible' => 1);
            
$wysiwygConfig Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
            if (
$queue->getTemplate()->isPlain()) {
                $wysiwygConfig
->setEnabled(false);
            
}
            $fieldset
->addField('text','editor', array(
                
'name'      => 'text',
                
'label'     => Mage::helper('newsletter')->__('Message'),
                
'state'     => 'html',
                
'required'  => true,
                
'value'     => $queue->getTemplate()->getTemplateTextPreprocessed(),
                
'style'     => 'width:98%; height: 600px;',
                
'config'    => $wysiwygConfig
            
));
        
else {
            $fieldset
->addField('text','text', array(
                
'name'      =>    'text',
                
'label'     =>    Mage::helper('newsletter')->__('Message'),
                
'value'     =>    $this->getUrl('*/newsletter_template/preview',  array(
                                     
'id' => $queue->getTemplate()->getId()
                                  ))
            ));

            
$form->getElement('text')->setRenderer(Mage::getModel('adminhtml/newsletter_renderer_text'));
            
$form->getElement('subject')->setDisabled('true');
            
$form->getElement('sender_name')->setDisabled('true');
            
$form->getElement('sender_email')->setDisabled('true');
            
$form->getElement('stores')->setDisabled('true');
        
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
crazygirl
Member
 
Total Posts:  56
Joined:  2010-11-16
 

I hard to google extremely hard to find this but thank you very much.  Fixed 1.4.1.1

Thought I was going completely crazy when it kept going blank!

 
Magento Community Magento Community
Magento Community
Magento Community
 
emmenko
Sr. Member
 
Total Posts:  96
Joined:  2010-10-20
 

Hi guys,

finally, this fix works also for me, thx!!!

At the beginning it wasn’t working but I then discovered that was an extension that made conflicts.
I’ve installed Fontis_Wysiwyg Extension and with this enabled the template was always blank.

Disabled it and it works.....maybe can help somebody!

Cheers
Nicola

 
Magento Community Magento Community
Magento Community
Magento Community
 
surfpacific
Jr. Member
 
Total Posts:  11
Joined:  2011-03-20
 
dan jones - 24 September 2010 06:49 AM

*sigh* another bug I see.

I wrote a quick extension for people who don’t really want to go and edit code and what not. Just drop the file in the link into the Magento webroot and extract, and watch the problem mysteriously vanish!

Dan

Link: BTS_NewsletterFix.tar.gz

Thanks!

That worked great for me

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sistemi Informativi
Jr. Member
 
Total Posts:  17
Joined:  2009-11-19
Italy
 

I have the sam problem in Magento 1.4.2 -.-
I upgrade magento from 1.3.4.0 and now don’t work newsletter queue..

thanks.
Giamp

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sistemi Informativi
Jr. Member
 
Total Posts:  17
Joined:  2009-11-19
Italy
 

SOLVED -
Sorry :
http://www.magentocommerce.com/bug-tracking/issue?issue=10486

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sabated
Jr. Member
 
Total Posts:  11
Joined:  2009-02-13
 

I have the same problem in Magento 1.4.1.1…

I tried different solutions and there is no success

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sabated
Jr. Member
 
Total Posts:  11
Joined:  2009-02-13
 

Same problem with Magento 1.4.1.1
look the jpg image

Image Attachments
newsletter.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Sabated
Jr. Member
 
Total Posts:  11
Joined:  2009-02-13
 

no have solutions?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top