Guys,

i love this module. GREAT idea and GREAT implementation.

But i found a small bug on PGSQL: ERROR: column "blocks.weight" must appear in the GROUP BY clause or be used in an aggregate function query: SELECT module, delta, weight, region, status FROM blocks GROUP BY module, delta ORDER BY weight, module, delta in /context/context_ui/context_ui.admin.inc on line 955

To fix it, include all fields listed on SELECT in the ORDER BY too (module, delta, weight, region, status).

regards,

massa

Comments

yhahn’s picture

Status: Needs review » Fixed
brmassa’s picture

Status: Fixed » Needs review

young hahn,

my fault. I mistyped the problem. its GROUP BY, not ORDER BY what Postgres complains. So its ... ORDER BY module, delta, weight, region, status ORDER BY weight, module, delta

In fact, because the block are always unique if considering module+delta values, the whole GROUP BY is useless. I suggest to remove it entirely.

despite that, great module. again, sorry for the mistake.

regards,

massa

pasqualle’s picture

block are always unique if considering module+delta values

why?

    'unique keys' => array(
      'tmd' => array('theme', 'module', 'delta'),
    ),
brmassa’s picture

Bálint,

yep. you are right. The SQL should include the current theme into WHERE to avoid repetitive blocks (or overwriting the form options).

But because the data is re-organized after the sql call by the php code, there is no need for the GROUP BY statement. Its only extra complexity (and bugs for PostgreSQL)

regards,

massa

pasqualle’s picture

Yes the select probably could be filtered by theme, as context still works with 1 theme only, but the default theme should be used..
see: #329563: Context blocks should be taken for default theme, not for admin theme.

yhahn’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.