creativedutchmen/email_newsletter_manager — Issue #20: Recipient groups: Filtering fails for SBL fields
Author: michael-e
Created: 2012-02-29 11:42:41+00:00
State: open

When an SBL field is used to filter a section, preview breaks with a _Symphony Fatal Database Error_:

Unknown column 't333_1.value' in 'where clause'
An error occurred while attempting to execute the following query
SELECT SQL_CACHE `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date` FROM `sym_entries` AS `e` LEFT JOIN `sym_entries_data_333` AS t333_1 ON (e.id = t333_1.entry_id) LEFT JOIN sym_entries_data_170 AS `d` ON `e`.`id` = `d`.`entry_id`LEFT OUTER JOIN `sym_entries_data_168` AS `ed` ON (`e`.`id` = `ed`.`entry_id`) WHERE 1 AND `e`.`section_id` = '27' AND t333_1.value IN ('4009') AND `d`.`value` IS NOT NULL GROUP BY `d`.`value` ORDER BY `ed`.`value` asc LIMIT 0, 17

Using "value" on an SBL table can not work, since SBL has a `relation_id` column instead.