There is an error in the block module, if you are using under PostgreSQL. If somebody wants to edit a block, just will see an error message: Fatal error: Unsupported operand types in modules\block\block.module on line 309
The original version of function block_box_get:
function block_box_get($bid) {
return db_fetch_array(db_query("SELECT bx.*, bl.title FROM {boxes} bx INNER JOIN {blocks} bl ON bx.bid = bl.delta WHERE bl.module = 'block' AND bx.bid = %d", $bid));
}
It is not work under PostgreSQL, because boxes.bid type is integer, and blocks.delta is character variyng, and there is not a valid, internal type cast in that case. My solution, this is work, but only under Postgres:
INNER JOIN {blocks} bl ON bx.bid = cast(cast(bl.delta as text) as integer) ...
I hope, somebody knows a better, general solution...
Comments
Comment #1
hswong3i commentedYour PostgreSQL version? Seems this is one of the problem for latest PostgreSQL (maybe, 8.3?)
Comment #2
zoltán balogh commentedYes, 8.3 in the test environment, but just 7.4.4 on the web. The bug is occur both places.
Comment #3
jaydub commentedIssue is a duplicate of http://drupal.org/node/220064
Can you you verify this is a problem in 7.x? This should only affect the new 8.3 release