-
- borriglione_le

-
Total Posts: 15
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)
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 )); }
|