In my magento application 4lakhs customer have newsletter subscription,when i like to see the subscription grid in magento admin,it show the blank page.

The existing query is

$collection = Mage::getResourceSingleton('newsletter/subscriber_collection')

I also see the large collection handler in Magento, but i don't know how to write the large collection with this subscriber_collection.

Can you share your idea about how to handle the large newsletter collection in magento. thanks in advance for your answer.

enter image description here

enter image description here

enter image description here


Basically blank page is only shown when there is any error occurred. Can you please verify Magento exception log or server error log file which might be logged any entry for blank page error.

Subscriber Grid

enter image description here

Newsletter Subscriber Grid Collection SQL:

    `customer_lastname_table`.`value` AS `customer_lastname`, 
    `customer_firstname_table`.`value` AS `customer_firstname`, 
    IF(main_table.customer_id = 0, 1, 2) AS `type`, 

FROM `newsletter_subscriber` AS `main_table`
 LEFT JOIN `customer_entity_varchar` AS `customer_lastname_table` ON customer_lastname_table.entity_id=main_table.customer_id
                 AND customer_lastname_table.attribute_id = 7
 LEFT JOIN `customer_entity_varchar` AS `customer_firstname_table` ON customer_firstname_table.entity_id=main_table.customer_id
                 AND customer_firstname_table.attribute_id = 5
 INNER JOIN `core_store` AS `store` ON store.store_id = main_table.store_id

In _prepareCollection() of Mage_Adminhtml_Block_Newsletter_Subscriber_Grid [app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php] class Magento will instantiate newsletter collection as below. You can also instantiate same thing in you code.

$collection = Mage::getResourceSingleton('newsletter/subscriber_collection');
/* @var $collection Mage_Newsletter_Model_Mysql4_Subscriber_Collection */
  • if suppose in my application having 1000 records means, its working fine.so the problem in large customer collection. – senthil Jan 9 '16 at 7:51
  • @senthil Please go through exception logs, it will gives you exact reason behind that. – Jayesh Patel Jan 9 '16 at 7:58
  • the problem is the usertype, firstname, lastname not show, when i have nearly 4 laksh record, i attached screen in my question for your better understanding – senthil Jan 9 '16 at 9:50
  • Its seems grid is working now instead of blank page, apart from that can you please randomly check database entries for empty User Type, Subscriber First Name, Subscriber Last Name. It helps you to figure out the issue. – Jayesh Patel Jan 9 '16 at 10:43
  • yes you are right, i also check the customer grid regarding the firstname,lastname and usertype. but it having the value, this is not only show on the newsletter subscription grid. i attached the 3rd screen for your referrence. is there have any way to find the problem – senthil Jan 9 '16 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.