Strange but for some reason, installing the newsletter module produces error below. All seems fine, with the module installed and enabled. However, error appears when clicking on the list from the newsletter administration backend – /admin/config/media/newsletter/lists

message

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘database_prodd7.field_data_field_newsletter_template’ doesn’t exist: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {newsletter_list} lists INNER JOIN {field_data_field_newsletter_template} template_field ON lists.nlid = template_field.entity_id INNER JOIN {newsletter_template} templates ON template_field.field_newsletter_template_target_id = templates.ntid) subquery; Array ( ) in PagerDefault->execute() (line 74 of /home/website/public_html/includes/pager.inc).

Upon closer inspection of the database, and comparing it to a clean, local installation, the following tables seems to be missing. Therefore, exporting these from a local database copy then re-importing these to production seems to have worked.

  • field_data_field_newsletter_list
  • field_data_field_newsletter_template

Default Newsletter module tables that should be present in the installation:

field_data_field_list_description
field_data_field_newsletter_body
field_data_field_newsletter_categories
field_data_field_newsletter_list
field_data_field_newsletter_template
 
field_revision_field_list_description
field_revision_field_newsletter_body
field_revision_field_newsletter_categories
field_revision_field_newsletter_list
field_revision_field_newsletter_template
 
newsletter_list
newsletter_newsletter
newsletter_subscriber
newsletter_template

IMPORTANT! Perform lots of database backups beforehand for easy reversion in case above does not work. Hope this helps